Skip to content

Commit

Permalink
use chapel-blog sources inside chapel/test (#26033)
Browse files Browse the repository at this point in the history
This makes a minor change to the nightly script when testing the
chapel-blog. Instead of testing from a directory external to
`$CHPL_HOME`, now the relevant blog sub directories will be copied into
`$CHPL_HOME/test/copied-chapel-blog/` so that reports on failures will
not include the full path, which was exposing test machine directory
structure.

TESTING:

- [x] local testing of `test-linux64-llvm16.bash`

[reviewed by @riftEmber - thanks!]
  • Loading branch information
arezaii authored Oct 3, 2024
2 parents 6086616 + b114a03 commit 939475f
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions util/cron/nightly
Original file line number Diff line number Diff line change
Expand Up @@ -409,14 +409,17 @@ if ($testblog == 1) {
exit 1;
}
}
if ($blogonly == 0) {
# copy the relevant blog source files into the test directory so they'll be
# ran alongside all the other tests
mysystem("mkdir -p $testdir/copied-chapel-blog/content", "making chpl-src directory", $exitOnError, 1);
mysystem("cp -r $blogdir/chpl-src $testdir/copied-chapel-blog/", "copying chapel-blog/chpl-src", $exitOnError, 1);
mysystem("cp -r $blogdir/scripts $testdir/copied-chapel-blog/", "copying chapel-blog/scripts", $exitOnError, 1);
mysystem("cp -r $blogdir/content/posts $testdir/copied-chapel-blog/content/", "copying chapel-blog/content", $exitOnError, 1);
}

# copy the relevant blog source files into the test directory so they'll be
# ran alongside all the other tests and the results will truncate $CHPL_HOME
# from the test file paths when reporting errors. Copying specific subdirectories
# this way avoids a bunch of skipped directories and the problem of testing
# the archetypes blog directory.
mysystem("mkdir -p $testdir/copied-chapel-blog/content", "making chpl-src directory", $exitOnError, 1);
mysystem("cp -r $blogdir/chpl-src $testdir/copied-chapel-blog/", "copying chapel-blog/chpl-src", $exitOnError, 1);
mysystem("cp -r $blogdir/scripts $testdir/copied-chapel-blog/", "copying chapel-blog/scripts", $exitOnError, 1);
mysystem("cp -r $blogdir/content/posts $testdir/copied-chapel-blog/content/", "copying chapel-blog/content", $exitOnError, 1);

}

# Determine which make to use.
Expand Down Expand Up @@ -631,9 +634,7 @@ if ($examples == 1) {
}

if ($blogonly == 1 || ($testblog == 1 && $examples == 1)) {
# test the sub-directories explicitly to avoid a bunch of skipped directories,
# and also avoid the problem of testing the archetypes directory
$testdirs .= " $blogdir/chpl-src/ $blogdir/content/posts";
$testdirs .= " $testdir/copied-chapel-blog/";
}

if ($chplcheckonly == 1) {
Expand Down

0 comments on commit 939475f

Please sign in to comment.