[FFmpeg-devel] tests/run-sh: Add execsuf to some calls of local tools

Submitted by Carl Eugen Hoyos on April 19, 2019, 4:05 p.m.

Details

Message ID CAB0OVGqnyhGQSMPdWOgKQ1W=j2vHqJRZStvVDvrU1Xz+8Rce=A@mail.gmail.com
State Accepted
Headers show

Commit Message

Carl Eugen Hoyos April 19, 2019, 4:05 p.m.
2019-04-19 16:12 GMT+02:00, Carl Eugen Hoyos <ceffmpeg@gmail.com>:
> 2019-04-19 13:11 GMT+02:00, Carl Eugen Hoyos <ceffmpeg@gmail.com>:
>
>> Attached patch is needed here for fate on wsl with msvc, not
>> sure why I didn't need this with mingw-gcc.
>
> Better tested and correct variant attached.

And a third attempt.
No idea why the others initially worked...

Carl Eugen

Comments

Carl Eugen Hoyos April 23, 2019, 11:45 p.m.
2019-04-19 18:05 GMT+02:00, Carl Eugen Hoyos <ceffmpeg@gmail.com>:
> 2019-04-19 16:12 GMT+02:00, Carl Eugen Hoyos <ceffmpeg@gmail.com>:
>> 2019-04-19 13:11 GMT+02:00, Carl Eugen Hoyos <ceffmpeg@gmail.com>:
>>
>>> Attached patch is needed here for fate on wsl with msvc, not
>>> sure why I didn't need this with mingw-gcc.
>>
>> Better tested and correct variant attached.
>
> And a third attempt.
> No idea why the others initially worked...

Patch applied.

Carl Eugen

Patch hide | download patch | download mbox

From f9efc98e031738016464d2443474bc78776d0a7c Mon Sep 17 00:00:00 2001
From: Carl Eugen Hoyos <ceffmpeg@gmail.com>
Date: Fri, 19 Apr 2019 18:04:33 +0200
Subject: [PATCH] tests/fate-run: New variable hostexecsuf for local fate
 tools.

Allows running fate on wsl with msvc.
---
 tests/Makefile    |    1 +
 tests/fate-run.sh |    8 ++++----
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/tests/Makefile b/tests/Makefile
index 50408c2..624292d 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -232,6 +232,7 @@  FATE += $(FATE_HW-yes)
 
 $(FATE) $(FATE_TESTS-no): export PROGSUF = $(PROGSSUF)
 $(FATE) $(FATE_TESTS-no): export EXECSUF = $(EXESUF)
+$(FATE) $(FATE_TESTS-no): export HOSTEXECSUF = $(HOSTEXESUF)
 $(FATE) $(FATE_TESTS-no): $(FATE_UTILS:%=tests/%$(HOSTEXESUF)) | $(FATE_OUTDIRS)
 	@echo "TEST    $(@:fate-%=%)"
 	$(Q)$(SRC_PATH)/tests/fate-run.sh $@ "$(TARGET_SAMPLES)" "$(TARGET_EXEC)" "$(TARGET_PATH)" '$(CMD)' '$(CMP)' '$(REF)' '$(FUZZ)' '$(THREADS)' '$(THREAD_TYPE)' '$(CPUFLAGS)' '$(CMP_SHIFT)' '$(CMP_TARGET)' '$(SIZE_TOLERANCE)' '$(CMP_UNIT)' '$(GEN)' '$(HWACCEL)' '$(REPORT)' '$(KEEP)'
diff --git a/tests/fate-run.sh b/tests/fate-run.sh
index 56c4efb..2f1991d 100755
--- a/tests/fate-run.sh
+++ b/tests/fate-run.sh
@@ -5,7 +5,7 @@  export LC_ALL=C
 base=$(dirname $0)
 . "${base}/md5.sh"
 
-base64=tests/base64
+base64=tests/base64${HOSTEXECSUF}
 
 test="${1#fate-}"
 target_samples=$2
@@ -45,7 +45,7 @@  compare(){
 }
 
 do_tiny_psnr(){
-    psnr=$(tests/tiny_psnr "$1" "$2" $cmp_unit $cmp_shift 0) || return 1
+    psnr=$(tests/tiny_psnr${HOSTEXECSUF} "$1" "$2" $cmp_unit $cmp_shift 0) || return 1
     val=$(expr "$psnr" : ".*$3: *\([0-9.]*\)")
     size1=$(expr "$psnr" : '.*bytes: *\([0-9]*\)')
     size2=$(expr "$psnr" : '.*bytes:[ 0-9]*/ *\([0-9]*\)')
@@ -206,7 +206,7 @@  enc_dec(){
     ffmpeg $8 $DEC_OPTS -i $tencfile $ENC_OPTS $dec_opt $FLAGS \
         -f $dec_fmt -y $tdecfile || return
     do_md5sum $decfile
-    tests/tiny_psnr $srcfile $decfile $cmp_unit $cmp_shift
+    tests/tiny_psnr${HOSTEXECSUF} $srcfile $decfile $cmp_unit $cmp_shift
 }
 
 transcode(){
@@ -455,7 +455,7 @@  audio_match(){
     cleanfiles="$cleanfiles $decfile"
 
     ffmpeg -i "$sample" -bitexact $extra_args -y $decfile
-    tests/audiomatch $decfile $trefile
+    tests/audiomatch${HOSTEXECSUF} $decfile $trefile
 }
 
 concat(){
-- 
1.7.10.4