Skip to content

Commit

Permalink
Made changes to Makefile to remove .out and .diff files after success…
Browse files Browse the repository at this point in the history
…ful run
  • Loading branch information
jakedcolbert committed May 4, 2022
1 parent 2fa7777 commit 3d59230
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ test-all: project5 test-nowhere test-one-road test-simple test-local test-combo
test: project5
./project5 < test-data/t0502-combo.in > test-data/project5.out
diff test-data/project5.out test-data/shortest.out > test.diff
rm test.diff && rm project5.out

# test the code against an expected output file
test-nowhere: project5
Expand All @@ -35,6 +36,7 @@ test-nowhere: project5
@echo ""
./project5 < test-data/t01-nowhere.in > test-data/project5.out
diff test-data/project5.out test-data/t01-nowhere.out > test.diff
rm test.diff && rm project5.out
@echo "$(GREEN)Passed!$(RESET)"

# test the code against an expected output file
Expand All @@ -44,6 +46,7 @@ test-one-road: project5
@echo ""
./project5 < test-data/t02-one-road.in > test-data/project5.out
diff test-data/project5.out test-data/t02-one-road.out > test.diff
rm test.diff && rm project5.out
@echo "$(GREEN)Passed!$(RESET)"

# test the code against an expected output file
Expand All @@ -53,6 +56,7 @@ test-simple: project5
@echo ""
./project5 < test-data/t03-simple.in > test-data/project5.out
diff test-data/project5.out test-data/t03-simple.out > test.diff
rm test.diff && rm project5.out
@echo "$(GREEN)Passed!$(RESET)"

# test the code against an expected output file
Expand All @@ -62,6 +66,7 @@ test-local: project5
@echo ""
./project5 < test-data/t08-local.in > test-data/project5.out
diff test-data/project5.out test-data/t08-local.out > test.diff
rm test.diff && rm project5.out
@echo "$(GREEN)Passed!$(RESET)"

# test the code against an expected output file
Expand All @@ -71,4 +76,5 @@ test-combo: project5
@echo ""
./project5 < test-data/t0502-combo.in > test-data/project5.out
diff test-data/project5.out test-data/t0502-combo.out > test.diff
rm test.diff && rm project5.out
@echo "$(GREEN)Passed!$(RESET)"

0 comments on commit 3d59230

Please sign in to comment.