vp9_c_vs_simd_encode: Restore cwd at end of test
authorWan-Teh Chang <wtc@google.com>
Thu, 28 Sep 2023 15:58:36 +0000 (08:58 -0700)
committerWan-Teh Chang <wtc@google.com>
Thu, 28 Sep 2023 16:03:40 +0000 (09:03 -0700)
Restore the original current directory at the end of
vp9_c_vs_simd_enc_test().

Bug: webm:1800
Change-Id: Iad64848a231e3c900149cc2b248055b02dda80a6

test/vp9_c_vs_simd_encode.sh

index 2250354..8293947 100755 (executable)
@@ -65,7 +65,7 @@ vp9_enc_tool_path() {
 }
 
 # Environment check: Make sure input and source directories are available.
-vp9_c_vs_simd_enc_verify_environment () {
+vp9_c_vs_simd_enc_verify_environment() {
   if [ ! -e "${YUV_RAW_INPUT}" ]; then
     elog "libvpx test data must exist in LIBVPX_TEST_DATA_PATH."
     return 1
@@ -376,7 +376,9 @@ vp9_test_arm() {
   fi
 }
 
-vp9_c_vs_simd_enc_test () {
+vp9_c_vs_simd_enc_test() {
+  local save_dir=$(pwd)
+
   # Test Generic
   vp9_test_generic
 
@@ -410,6 +412,8 @@ vp9_c_vs_simd_enc_test () {
   else
     echo "vp9 test for arm: Done, all tests passed."
   fi
+
+  cd ${save_dir}
 }
 
 # Setup a trap function to clean up build, and output files after tests complete.