From 7884cffaf3380a66a999ae8db12e0418f96993c0 Mon Sep 17 00:00:00 2001 From: Steven Knight Date: Tue, 14 Aug 2001 11:17:14 +0000 Subject: Clean up tests. --- Construct | 6 ++-- config | 10 ++++-- doc/Conscript | 1 + src/scons/BuilderTests.py | 34 ++++++++++--------- src/scons/EnvironmentTests.py | 32 ++++++++++-------- src/scons/Node/FSTests.py | 4 ++- src/scons/Node/NodeTests.py | 4 ++- src/scons/Sig/MD5Tests.py | 8 ++--- src/scons/Sig/TimeStampTests.py | 7 ++-- template/Tests.py | 3 ++ template/test.py | 6 ++-- test/Program-j.py | 72 +++++++++++++++++++++++++++++++++++++++++ test/Program.py | 31 ++++++++++++++++++ test/SConscript.py | 28 ++++++++++++++++ test/option-f.py | 34 +++++++++++++++++++ test/option-j.py | 68 ++++++++++++++++++++++++++++++++++++++ test/t0001.py | 68 -------------------------------------- test/t0001.t | 30 ----------------- test/t0002.py | 72 ----------------------------------------- test/t0010.py | 29 ----------------- 20 files changed, 304 insertions(+), 243 deletions(-) create mode 100644 template/Tests.py create mode 100644 test/Program-j.py create mode 100644 test/Program.py create mode 100644 test/SConscript.py create mode 100644 test/option-f.py create mode 100644 test/option-j.py delete mode 100644 test/t0001.py delete mode 100644 test/t0001.t delete mode 100644 test/t0002.py delete mode 100644 test/t0010.py diff --git a/Construct b/Construct index 6fe3633..559591a 100644 --- a/Construct +++ b/Construct @@ -21,6 +21,8 @@ $developer = $ARG{developer} || '???'; chomp($revision = $ARG{version} || `aesub '\$version' 2>/dev/null` || '0.01'); +chomp($change = $ARG{change} || `aesub '\$change' 2>/dev/null`); + @arr = split(/\./, $revision); @arr = ($arr[0], map {length($_) == 1 ? "0$_" : $_} @arr[1 .. $#arr]); $revision = join('.', @arr); @@ -109,8 +111,8 @@ Build 'build/doc/Conscript'; # that goes into the archive. # -foreach (`aegis -list cf 2>/dev/null`) { - $seen{"$1\n"}++ if /^source\s+remove\s.*\s(\S+)$/; +foreach (`aegis -list -unf -c $change cf 2>/dev/null`) { + $seen{"$1\n"}++ if /^(?:source|test) remove(?:\s.*)+\s(\S+)$/; } eval '@src_files = grep(! $seen{$_}++, diff --git a/config b/config index c36eaf0..bad5168 100644 --- a/config +++ b/config @@ -34,7 +34,7 @@ * if the file is not in the change. Look in aesub(5) for more information * about command substitutions. */ -build_command = "cons date='${DAte %Y/%m/%d %H:%M:%S}' developer=${DEVeloper} version=${VERsion}"; +build_command = "cons date='${DAte %Y/%m/%d %H:%M:%S}' developer=${DEVeloper} version=${VERsion} change=${Change}"; /* * The rules used in the User Guide all remove their targets before @@ -244,6 +244,8 @@ diff_command = */ test_command = "python runtest.py -v ${VERsion} ${File_Name}"; +new_test_filename = "test/CHANGETHIS.py"; + /* * */ @@ -255,10 +257,14 @@ file_template = }, { pattern = [ "src/scons/*Tests.py" ]; - body = "${read_file ${source template/test.py abs}}"; + body = "${read_file ${source template/Tests.py abs}}"; }, { pattern = [ "src/scons/*.py" ]; body = "${read_file ${source template/file.py abs}}"; }, + { + pattern = [ "test/*.py" ]; + body = "${read_file ${source template/test.py abs}}"; + }, ]; diff --git a/doc/Conscript b/doc/Conscript index 948d8eb..75c2e9c 100644 --- a/doc/Conscript +++ b/doc/Conscript @@ -21,6 +21,7 @@ $doc_tar_gz = "#build/dist/scons-doc-$version.tar.gz"; # $verfile = SourcePath("version.sgml"); unlink($verfile); +chmod(0664, $verfile); open(FILE, ">$verfile") || die "Cannot open '$verfile': $!"; print FILE <<_EOF_;