Skip to content

Commit

Permalink
Avoid errors in parallel tests
Browse files Browse the repository at this point in the history
  • Loading branch information
eribertomota committed Aug 21, 2021
1 parent 79cfe18 commit e1437dc
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 9 deletions.
4 changes: 4 additions & 0 deletions tests/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,9 @@ TESTS = embed_extract_jpg.sh \
embed_extract_ppm.sh \
test_seek.sh

CLEANFILES = test-with-message.jpg \
test-with-message.pnm \
test-with-message.ppm

distclean-local:
rm -f out.jpg
6 changes: 3 additions & 3 deletions tests/embed_extract_jpg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ echo -e "\nEmbedding a message..."

# Retrieve message
echo -e "\nExtracting a message..."
../src/outguess -k "secret-key-001" -r test-with-message.jpg text.txt
cat text.txt | grep "inside of the image" || { echo ERROR; exit 1; }
../src/outguess -k "secret-key-001" -r test-with-message.jpg text-jpg.txt
cat text-jpg.txt | grep "inside of the image" || { echo ERROR; exit 1; }

# Remove files
rm -f test-with-message.jpg text.txt
rm -f test-with-message.jpg text-jpg.txt
6 changes: 3 additions & 3 deletions tests/embed_extract_pnm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ echo -e "\nEmbedding a message..."

# Retrieve message
echo -e "\nExtracting a message..."
../src/outguess -k "secret-key-001" -r test-with-message.pnm text.txt
cat text.txt | grep "inside of the image" || { echo ERROR; exit 1; }
../src/outguess -k "secret-key-001" -r test-with-message.pnm text-pnm.txt
cat text-pnm.txt | grep "inside of the image" || { echo ERROR; exit 1; }

# Remove files
rm -f test-with-message.pnm text.txt
rm -f test-with-message.pnm text-pnm.txt
6 changes: 3 additions & 3 deletions tests/embed_extract_ppm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ echo -e "\nEmbedding a message..."

# Retrieve message
echo -e "\nExtracting a message..."
../src/outguess -k "secret-key-001" -r test-with-message.ppm text.txt
cat text.txt | grep "inside of the image" || { echo ERROR; exit 1; }
../src/outguess -k "secret-key-001" -r test-with-message.ppm text-ppm.txt
cat text-ppm.txt | grep "inside of the image" || { echo ERROR; exit 1; }

# Remove files
rm -f test-with-message.ppm text.txt
rm -f test-with-message.ppm text-ppm.txt

0 comments on commit e1437dc

Please sign in to comment.