-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add precondition to run tests (#2887)
Some tests require external dependencies, such as `rustc`, `wasmer`, `run_cairo_vm.sh`, etc. If one does not have some of these available on their computer, then the test suite will have a lot of failed tests with the same fail message `X is not on $PATH`. This can be a bit ditracting and it slows running the test suite. I've introduced some preconditions that are checked before the actual test suite so that if some of these commands are not on path then the tests that need them are not run. Instead, you get a single failed test (for each of the subtrees that failed the precondition).
- Loading branch information
1 parent
3736ed1
commit 7d2a59c
Showing
19 changed files
with
194 additions
and
121 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,14 @@ | ||
module Casm.Compilation where | ||
|
||
import Base | ||
import Casm.Compilation.Negative qualified as N | ||
import Casm.Compilation.Positive qualified as P | ||
import Casm.Compilation.Negative qualified as Negative | ||
import Casm.Compilation.Positive qualified as Positive | ||
|
||
allTests :: TestTree | ||
allTests = testGroup "Juvix to CASM compilation" [P.allTests, P.allTestsNoOptimize, N.allTests] | ||
allTests :: IO TestTree | ||
allTests = | ||
testGroup "Juvix to CASM compilation" | ||
<$> sequence | ||
[ Positive.allTests, | ||
Positive.allTestsNoOptimize, | ||
return Negative.allTests | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,14 @@ | ||
module Casm.Reg where | ||
|
||
import Base | ||
import Casm.Reg.Cairo qualified as C | ||
import Casm.Reg.Positive qualified as P | ||
import Casm.Reg.Cairo qualified as Cairo | ||
import Casm.Reg.Positive qualified as Positive | ||
|
||
allTests :: TestTree | ||
allTests = testGroup "JuvixReg to CASM translation" [P.allTests, C.allTests] | ||
allTests :: IO TestTree | ||
allTests = | ||
testGroup | ||
"JuvixReg to CASM translation" | ||
<$> sequence | ||
[ return Positive.allTests, | ||
Cairo.allTests | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
module Casm.Run where | ||
|
||
import Base | ||
import Casm.Run.Negative qualified as RunN | ||
import Casm.Run.Positive qualified as RunP | ||
import Casm.Run.Negative qualified as Negative | ||
import Casm.Run.Positive qualified as Positive | ||
|
||
allTests :: TestTree | ||
allTests = testGroup "CASM run" [RunP.allTests, RunN.allTests] | ||
allTests :: IO TestTree | ||
allTests = testGroup "CASM run" <$> sequence [Positive.allTests, return Negative.allTests] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,10 @@ | ||
module Rust.Compilation where | ||
|
||
import Base | ||
import Rust.Compilation.Base | ||
import Rust.Compilation.Positive qualified as P | ||
|
||
allTests :: TestTree | ||
allTests = testGroup "Juvix to native Rust compilation tests" [P.allTests, P.allTestsNoOptimize] | ||
allTests :: IO TestTree | ||
allTests = | ||
withPrecondition precondition . return $ | ||
testGroup "Juvix to native Rust compilation tests" [P.allTests, P.allTestsNoOptimize] |
Oops, something went wrong.