diff --git a/tst/testall.g b/tst/testall.g index 70f56f7..d5e94c7 100755 --- a/tst/testall.g +++ b/tst/testall.g @@ -14,10 +14,20 @@ if not UtilsLoadingComplete then ReadPackage( "utils", "tst/loadall.g" ); fi; -# Create/update the testfiles containing the manual examples. -# (The "nopdf" option informs AutoDoc that it can skip generating -# PDF files, which makes this much faster) -ReadPackage( "utils", "makedoc.g" : nopdf ); +tstdir:= DirectoriesPackageLibrary( "utils", "tst" ); +tstfile:= Filename( tstdir[1], "utils01.tst" ); +tstdir:= Filename( tstdir, "" ); +if IsWritableFile( tstdir ) and + ( IsWritableFile( tstfile ) or not IsExistingFile( tstfile ) ) then + # Create/update the testfiles containing the manual examples. + # (The "nopdf" option informs AutoDoc that it can skip generating + # PDF files, which makes this much faster) + ReadPackage( "utils", "makedoc.g" : nopdf ); +elif not IsExistingFile( tstfile ) then + Print( "The testfiles with manual examples are missing ", + "and cannot get written.\n" ); + QUIT_GAP(1); +fi; dir := DirectoriesPackageLibrary( "utils", "tst" ); TestDirectory(dir, rec(exitGAP := true,