From 2a3a0111f76a89cd74083a7e95f508ae003b8dbc Mon Sep 17 00:00:00 2001 From: stevenknight Date: Tue, 14 Aug 2001 11:17:14 +0000 Subject: [PATCH] Clean up tests. git-svn-id: http://scons.tigris.org/svn/scons/trunk@23 fdb21ef1-2011-0410-befe-b5e4ea1792b1 --- 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/{t0002.py => Program-j.py} | 10 +++++----- test/{t0010.py => Program.py} | 8 +++++--- test/SConscript.py | 28 +++++++++++++++++++++++++++ test/option-f.py | 34 +++++++++++++++++++++++++++++++++ test/{t0001.py => option-j.py} | 12 ++++++------ test/t0001.t | 30 ----------------------------- 17 files changed, 149 insertions(+), 88 deletions(-) create mode 100644 template/Tests.py rename test/{t0002.py => Program-j.py} (83%) rename test/{t0010.py => Program.py} (63%) create mode 100644 test/SConscript.py create mode 100644 test/option-f.py rename test/{t0001.py => option-j.py} (84%) delete mode 100644 test/t0001.t diff --git a/Construct b/Construct index 6fe36338..559591a1 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 c36eaf0a..bad5168f 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 948d8eb9..75c2e9c9 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_;