Forráskód Böngészése

Fix a few issues in "run_wasi_tests.sh: provide stdin by ourselves" (#2582)

Apply "provide stdin by ourselves" to the aot case and check the correct exit code.
YAMAMOTO Takashi 2 éve
szülő
commit
363f08975b

+ 3 - 3
tests/wamr-test-suites/wasi-test-script/run_wasi_tests.sh

@@ -51,8 +51,8 @@ run_aot_tests () {
             expected=$(jq .exit_code ${test_json})
         fi
 
-        ${iwasm} $test_aot
-        ret=${PIPESTATUS[0]}
+        python3 ${THIS_DIR}/pipe.py | ${iwasm} $test_aot
+        ret=${PIPESTATUS[1]}
 
         echo "expected=$expected, actual=$ret"
         if [[ $expected != "" ]] && [[ $expected != $ret ]];then
@@ -75,7 +75,7 @@ if [[ $MODE != "aot" ]];then
                 ${THREAD_INTERNAL_TESTS} \
                 ${LIB_SOCKET_TESTS} \
 
-    ret=${PIPESTATUS[0]}
+    ret=${PIPESTATUS[1]}
 
     TEST_RUNTIME_EXE="${IWASM_CMD_STRESS}" python3 test-runner/wasi_test_runner.py \
             -r adapters/wasm-micro-runtime.py \