Skip to content

Commit e765531

Browse files
committed
Get back to current working path after test finishes
The escript building test didn't use to restore the proper working directory. This caused `mix coveralls.html` not to work as it got confused looking up the html template to render in the dependencies.
1 parent e651c54 commit e765531

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

test/benchee_test.exs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1068,6 +1068,7 @@ defmodule BencheeTest do
10681068
end
10691069

10701070
describe "escript building" do
1071+
@working_directory File.cwd!()
10711072
@sample_project_directory Path.expand("fixtures/escript", __DIR__)
10721073
test "benchee can be built into and used as an escript" do
10731074
File.cd!(@sample_project_directory)
@@ -1076,6 +1077,8 @@ defmodule BencheeTest do
10761077

10771078
readme_sample_asserts(output)
10781079
assert exit_status == 0
1080+
after
1081+
File.cd!(@working_directory)
10791082
end
10801083
end
10811084

0 commit comments

Comments
 (0)