Eliminate / replace remaining cPickle references in test scripts.
[scons.git] / config
diff --git a/config b/config
index c36eaf0aac947d6e48c315559487f1ba8b47ccdf..b055bdb279db7b37b1e50800a32947900c0de254 100644 (file)
--- a/config
+++ b/config
@@ -1,68 +1,71 @@
 /*
- *     aegis - project change supervisor
- *     This file is in the Public Domain, 1995, Peter Miller.
- *
- * MANIFEST: example use of make in project config file
- *
- * The make(1) program exists in many forms, usually one is available with each
- * UNIX version.  The one used in the writing of this section is GNU Make 3.70,
- * avaiable by anonymous FTP from your nearest GNU archive site.  GNU Make was
- * chosen because it was the most powerful, it is widely avaiable (usually for
- * little or no cost) and discussion of the alternatives (SunOS make, BSD 4.3
- * make, etc), would not be universally applicable.  "Plain vanilla" make
- * (with no transitive closure, no pattern rules, no functions) is not
- * sufficiently capable to satisfy the demands placed on it by aegis.
- *
- * As mentioned in the Dependency Maintenance Tool chapter of the User Guide,
- * make is not really sufficient, because it lacks dynamic include dependencies.
- * However, GNU Make has a form of dynamic include dependencies, and it has a
- * few quirks, but mostly works well.
- *
- * The other feature lacking in make is a search path.  While GNU Make has
- * functionality called VPATH, the implementation leaves something to be
- * desired, and can't be used for the search path functionality required by
- * aegis.  Because of this, the create_symlinks_before_build field of the
- * project config file is set to true so that aegis will arrange for the
- * development directory to be fiull of symbolic links, making it appear that
- * the entire project is in each change's development directory.
+ * MANIFEST: use of SCons in project config file to build itself
+ *
+ * SCons has a Repository feature, introduced in SCons 0.09, that was
+ * designed to work well with Aegis.
  */
 
 /*
- * The build_command field of the project config file is used to invoke the
- * relevant build command.  This command tells make where to find the rules.
- * The ${s Makefile} expands to a path into the baseline during development
- * if the file is not in the change.  Look in aesub(5) for more information
- * about command substitutions.
+ * The build_command field of the project config file is used to invoke
+ * the relevant build command.  This command tells SCons where to find
+ * the rules.
+ *
+ * Our chicken-and-egg dilemma is this: we want to use the version of
+ * SCons under development in an Aegis change to build itself.  But the
+ * pieces of SCons are likely only partly in this change, and partly in
+ * baselines.
+ *
+ * Python only imports things on a module-by-module basis--which is to
+ * say, once it finds __init__.py in a given directory, it assumes that
+ * all other files in that module are in the same directory.  But that's
+ * not the way Aegis works, because if a file hasn't changed on the
+ * branch, it will only be in its parent's baseline directory.
+ *
+ * Aegis' mechanism for working around this sort of problem is to make
+ * symlinks to the proper baseline versions of each file, which makes
+ * it look like everything is in the local tree.  That's unattractive,
+ * though, because we really want to eat our own dog food and use the
+ * SCons -Y options to pull things from the baseline repositories.
+ *
+ * So our solution (suggested by Anthony Roach) is a bootstrap.py script
+ * that does some Aegis-like searching through the baseline directories
+ * and makes a bootstrap copy of the version of SCons under development
+ * that we can use for building.  After it makes this copy of SCons, it
+ * executes it with the same command-line arguments we supplied (and
+ * setting $SCONS_LIB_DIR to the right directory) so we can use it
+ * here with command-line options as if it were SCons itself.  (Note,
+ * however, that bootstrap.py only understands the specific command-line
+ * options already in use here, so if you change the call below to add
+ * some other SCons options, you may have to modify bootstrap.py to
+ * recognize them.
+ *
+ * The ${Source bootstrap.py} substitution finds bootstrap.py wherever
+ * it may be in the Aegis baselines.
+ *
+ * The long -Y${SUBSTitute...} substitution takes the Aegis baseline
+ * search path and turns it into the right -Y command-line options for
+ * SCons.
+ *
+ * The rest of the substitutions (${DEVeloper}, etc.) should be obvious.
+ *
+ * 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 = "python2.1 ${Source bootstrap.py} -Y${SUBSTitute : \\ -Y $Search_Path} 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
- * constructing them, which qualifies them for the following entry in the
- * config file.  The files must be removed first, otherwise the baseline would
- * cease to be self-consistent.
+ * SCons removes its targets before constructing them, which qualifies it
+ * for the following entry in the config file.  The files must be removed
+ * first, otherwise the baseline would cease to be self-consistent.
  */
+
 link_integration_directory = true;
 
 /*
- * Another field to be set in this file is one which tells aegis to maintain
- * symbolic links between the development directory and the basline.  This also
- * requires that rules remove their targets before constructing them, to ensure
- * that development builds do not attempt to write their results onto the
- * read-only versions in the baseline.
- */
+ * This is set temporarily to allow us to build using the SCons
+ * currently checked in to the src directory.
 create_symlinks_before_build = true;
-
-/*
- * NOT UNTIL AEGIS 3.23; we may not need it anyway.
-remove_symlinks_after_build = false;
  */
 
-/*
-integrate_begin_command =
-       "";
-*/
-
 /*
  *     aegis - project change supervisor
  *     This file is in the Public Domain, 1995, 1998 Peter Miller.
@@ -231,18 +234,35 @@ merge -p -L baseline -L C$c ${quote $mostrecent} ${quote $original} \
 ${quote $input} > ${quote $output}; \
 test $? -le 1";
 
+/*
+ * The diff command in Red Hat 8.0 changed the exit status so it *fails*
+ * when *it* thinks it's trying to diff a binary (non-ASCII-text) file.
+ * The -a option disables this behavior and makes diff's exit status
+ * behave like it used to, even on any binary files we have checked in.
+ */
+
 diff_command =
        "set +e; \
-       diff -c ${quote $original} ${quote $input} > ${quote $output}; \
+       diff -a -c ${quote $original} ${quote $input} > ${quote $output}; \
        test $? -le 1";
 
 /*
- * We use an intermediary test.pl script to execute tests.
- * This serves as glue between the tests themselves (which are
- * written to conform to Perl conventions) and Aegis' expectations.
- * See the comments in the test.pl script itself for details.
+ * We use a runtest.py script to execute tests.  This takes care of
+ * massaging environment variables and the like to test against the
+ * unpacked package in the current directory.
+ *
+ * Note that we must include $spe in the batch_test_command line (so
+ * that Aegis thinks we're smart about testing ourselves against the
+ * baseline) but we don't actually need it.  Our tests always run
+ * relative to the package built under the current directory, which
+ * is set appropriately during a baseline test.  So we just use the
+ * proper aesub variable to comment out the expanded $spe.
  */
-test_command = "python runtest.py -v ${VERsion} ${File_Name}";
+test_command = "python1.5 ${Source runtest.py Absolute} --noqmtest -p tar-gz -t -v ${SUBSTitute '\\.[CD][0-9]+$' '' ${VERsion}} -q --sp ${Search_Path} --spe ${Search_Path_Executable} ${File_Name}";
+
+batch_test_command = "python1.5 ${Source runtest.py Absolute} --noqmtest -p tar-gz -t -v ${SUBSTitute '\\.[CD][0-9]+$' '' ${VERsion}} -o ${Output} --aegis  --sp ${Search_Path} --spe ${Search_Path_Executable} ${File_Names}";
+
+new_test_filename = "test/CHANGETHIS.py";
 
 /*
  *
@@ -250,15 +270,30 @@ test_command = "python runtest.py -v ${VERsion} ${File_Name}";
 file_template =
 [
        {
-               pattern = [ "src/scons/*__init__.py" ];
+               pattern = [ "src/engine/*__init__.py" ];
                body = "${read_file ${source template/__init__.py abs}}";
        },
        {
-               pattern = [ "src/scons/*Tests.py" ];
-               body = "${read_file ${source template/test.py abs}}";
+               pattern = [ "src/engine/*Tests.py" ];
+               body = "${read_file ${source template/Tests.py abs}}";
        },
        {
-               pattern = [ "src/scons/*.py" ];
+               pattern = [ "src/engine/*.py" ];
                body = "${read_file ${source template/file.py abs}}";
        },
+       {
+               pattern = [ "test/*.py" ];
+               body = "${read_file ${source template/test.py abs}}";
+       },
 ];
+
+/*
+ * Command for distributing changes from Aegis to all of the repositories
+ * we want to mirror the information.
+ *
+ * XXX Uncomment after upgrading to an Aegis version that supports this.
+
+integrate_pass_notify_command =
+        "$sh ${s bin/scons-cdist} -p $project $change";
+ *
+ */