Skip to content

Commit

Permalink
Avoid cd in update_image
Browse files Browse the repository at this point in the history
Signed-off-by: Anna Rift <[email protected]>
  • Loading branch information
riftEmber committed Oct 8, 2024
1 parent fc39ae0 commit 4c2b396
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions util/cron/test-docker.bash
Original file line number Diff line number Diff line change
Expand Up @@ -81,15 +81,11 @@ update_image() {
exit 1
fi

# Set up to test container
cd "${CHPL_HOME}/util/cron"
echo 'writeln("Hello, world!");' > hello.chpl

# Run test script inside container
echo 'writeln("Hello, world!");' > hello.chpl
docker run --rm -i "$imageName" < "$script"
CONTAINER_RUN=$?

# Clean up after our scratch test script, whether it succeeded or not
# Clean up scratch chpl file for testing
rm hello.chpl

if [ $CONTAINER_RUN -ne 0 ]
Expand Down

0 comments on commit 4c2b396

Please sign in to comment.