2024-12-30 11:08:48 +00:00
|
|
|
#!/usr/bin/env raku
|
|
|
|
use v6.d;
|
2024-12-30 13:43:26 +00:00
|
|
|
use IUtils;
|
2024-12-31 16:28:24 +00:00
|
|
|
use IUtils::Regexes;
|
2024-12-30 13:32:52 +00:00
|
|
|
|
2024-12-31 16:25:05 +00:00
|
|
|
#| Execute the tests in an idris project
|
|
|
|
multi MAIN(
|
|
|
|
"test",
|
|
|
|
Str $project-path?, #= Base directory of the project, defaults to $*CWD
|
|
|
|
) {
|
|
|
|
# CD into the project path if needed
|
|
|
|
chdir($project-path.IO.resolve: :completely) if $project-path;
|
|
|
|
# Scan for our packages
|
|
|
|
my @packages = scan-packages;
|
|
|
|
# Collect tests
|
|
|
|
my @tests;
|
|
|
|
for @packages -> $package {
|
|
|
|
# FIXME
|
|
|
|
say 'Finding tests for ', $package.ipkg.relative;
|
|
|
|
for $package.sources -> $source {
|
|
|
|
say 'Scanning for tests in ', $source;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|