Skip to content

Commit

Permalink
Remove errors during first run of runpaltests.h
Browse files Browse the repository at this point in the history
If you run `runpaltests.h` for first time, you will see 2 errors about file or folder not found.

First error comes from using `RELATIVE_PATH_TO_PAL_TESTS` which does not used anywhere, except maybe some platform where you can `cd` to non-existing folder. In that case 3rd parameter to script would be interpreted incorrectly. I doubt that, but who know what's somewhere deep in infra.

Second error is entirely preventable, since `cd $PAL_TEST_OUTPUT_DIR` does not affect anything until subsequent `cd $PAL_TEST_OUTPUT_DIR` on line 118.
 
Discovered here dotnet#62625 (comment)
  • Loading branch information
kant2002 committed Jan 11, 2022
1 parent 010b875 commit 4ce7c93
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions src/coreclr/pal/tests/palsuite/runpaltests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,6 @@ pushd $BUILD_ROOT_DIR

export LD_LIBRARY_PATH=$BUILD_ROOT_DIR:$LD_LIBRARY_PATH

# Create absolute path to the file that contains a list of PAL tests to execute.
# This file is located next to this script in the source tree
RELATIVE_PATH_TO_PAL_TESTS=$0
# Remove the name of this script from the path
RELATIVE_PATH_TO_PAL_TESTS=${RELATIVE_PATH_TO_PAL_TESTS%/*.*}
# Change current directory to the location of this script
cd $RELATIVE_PATH_TO_PAL_TESTS
# Environment variable PWD contains absolute path to the current folder
# so use it to create absolute path to the file with a list of tests.
PAL_TEST_LIST=$BUILD_ROOT_DIR/paltestlist.txt
Expand Down Expand Up @@ -79,8 +72,6 @@ then
fi
fi

cd $PAL_TEST_OUTPUT_DIR

echo PAL tests will store their temporary files and output in $PAL_TEST_OUTPUT_DIR.
if [ "$COPY_TO_TEST_OUTPUT_DIR" != "$PAL_TEST_OUTPUT_DIR" ]; then
echo Output files will be copied to $COPY_TO_TEST_OUTPUT_DIR at the end.
Expand Down

0 comments on commit 4ce7c93

Please sign in to comment.