Skip to content

Commit ef03c34

Browse files
committed
Add normal autobuild() invocation to catch basic errors
This stops the tests from complaining about the wrong kind of exception being thrown and just shows us the exception in the event that we've borked something so badly that `autobuild()` itself just doesn't work at all.
1 parent 0cbe527 commit ef03c34

File tree

1 file changed

+19
-4
lines changed

1 file changed

+19
-4
lines changed

test/basic.jl

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,22 +53,37 @@ end
5353

5454
@testset "environment and history saving" begin
5555
mktempdir() do temp_path
56+
# This is a litmus test, to catch any errors before we do a `@test_throws`
57+
autobuild(
58+
temp_path,
59+
"this_will_pass",
60+
v"1.0.0",
61+
# No sources to speak of
62+
FileSource[],
63+
# Just exit with code 0
64+
"""
65+
exit 0
66+
""",
67+
# Build for this platform
68+
[platform],
69+
# No products
70+
Product[],
71+
# No depenedencies
72+
Dependency[],
73+
)
74+
5675
@test_throws ErrorException autobuild(
5776
temp_path,
5877
"this_will_fail",
5978
v"1.0.0",
60-
# No sources to speak of
6179
FileSource[],
6280
# Simple script that just sets an environment variable
6381
"""
6482
MARKER=1
6583
exit 1
6684
""",
67-
# Build for this platform
6885
[platform],
69-
# No products
7086
Product[],
71-
# No depenedencies
7287
Dependency[],
7388
)
7489

0 commit comments

Comments
 (0)