Scanning checkpoint
This commit is contained in:
parent
a4e4c4a314
commit
9e9903429e
24
bin/iutils
24
bin/iutils
|
@ -3,8 +3,22 @@ use v6.d;
|
|||
use IUtils;
|
||||
use IUtils::Comments;
|
||||
|
||||
unit sub MAIN;
|
||||
|
||||
temp $*CWD = "/home/nathan/Projects/Idris/structures/".IO;
|
||||
|
||||
say scan-packages;
|
||||
#| 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,6 +28,9 @@ sub scan-ipkg(IO::Path:D $ipkg --> PackageInfo:D) {
|
|||
PackageInfo.new(ipkg => $ipkg, root => $ipkg.parent, sources => @sources)
|
||||
}
|
||||
|
||||
# TODO: Add some parsing of pack.toml to locate test packages and associate them
|
||||
# with their source ipkg
|
||||
|
||||
#| Scan $*CWD to locate ipkgs and their associated sources
|
||||
sub scan-packages(--> Array[PackageInfo:D]) is export {
|
||||
my PackageInfo:D @ipkgs =
|
||||
|
|
Loading…
Reference in a new issue