Bug 508316: Run acceptance suite with -AS3 (r=brbaker)
authorChris Peyer <cpeyer@adobe.com>
Tue, 12 Oct 2010 16:35:29 -0700
changeset 5351 e523f4426e83
parent 5350 59bedac94cf7
child 5352 168e3635dd48
push id2938
push usercpeyer@adobe.com
push dateTue, 12 Oct 2010 23:36:35 +0000
reviewersbrbaker
bugs508316
Bug 508316: Run acceptance suite with -AS3 (r=brbaker)
build/buildbot/master/tamarinredux.py
build/buildbot/slaves/all/codecoverage-test.csv
test/acceptance/as3/RuntimeErrors/Error1034TypeCoercionFailed.as
test/acceptance/as3/Vector/sort.as
test/acceptance/as3/Vector/sortInitializers.as
test/acceptance/dir.asc_args
test/acceptance/ecma3/dir.asc_args
test/acceptance/runtests.py
test/acceptance/shell.as
test/acceptance/spidermonkey/dir.asc_args
test/acceptance/testconfig.txt
test/util/runtestBase.py
--- a/build/buildbot/master/tamarinredux.py
+++ b/build/buildbot/master/tamarinredux.py
@@ -1976,16 +1976,19 @@ class tamarinredux:
     windows_deep_factory.addStep(BuildShellCommand(
                 command=['./build-vtune.sh', WithProperties('%s','revision')],
                 env={'branch': WithProperties('%s','branch')},
                 description='starting VTune build...',
                 descriptionDone='finished VTune build.',
                 name="VTune",
                 workdir="../repo/build/buildbot/slaves/scripts")
     )
+    # Do a test run where we compile with -ES. MUST be the last step of the build as it recompiles the .abc files used by all the other steps
+    windows_deep_factory.addStep(test_generic(name="Release_ES", shellname="avmshell", vmargs="", config="",
+                                              scriptargs="--ascargs=-no-AS3 --addtoconfig=-ES -f -x abcasm,ecma3,spidermonkey"))
     windows_deep_factory.addStep(util_process_clean)
     windows_deep_factory.addStep(util_clean_buildsdir)
     windows_deep_factory.addStep(sync_clean)
 
     windows_deep_builder = {
                 'name': "windows-deep",
                 'slavename': "windows-deep",
                 'factory': windows_deep_factory,
@@ -2033,16 +2036,19 @@ class tamarinredux:
     mac_deep_factory.addStep(BuildShellCommand(
                 command=['../all/build-doxygen.sh', WithProperties('%s','revision')],
                 env={'branch': WithProperties('%s','branch'), 'silent':WithProperties('%s','silent')},
                 description='starting doxygen build...',
                 descriptionDone='finished doxygen build.',
                 name="Doxygen",
                 workdir="../repo/build/buildbot/slaves/scripts")
     )
+    # Do a test run where we compile with -ES. MUST be the last step of the build as it recompiles the .abc files used by all the other steps
+    mac_deep_factory.addStep(test_generic(name="Release_ES", shellname="avmshell", vmargs="", config="",
+                                              scriptargs="--ascargs=-no-AS3 --addtoconfig=-ES -f -x abcasm,ecma3,spidermonkey"))
     mac_deep_factory.addStep(util_process_clean)
     mac_deep_factory.addStep(util_clean_buildsdir)
     mac_deep_factory.addStep(sync_clean)
 
     mac_deep_builder = {
                 'name': "mac-deep",
                 'slavename': "mac-deep",
                 'factory': mac_deep_factory,
@@ -2165,16 +2171,19 @@ class tamarinredux:
     solaris_sparc_deep_factory.addStep(test_selftest(name="DebugDebugger", shellname="avmshell_sd"))
     solaris_sparc_deep_factory.addStep(test_generic(name="Debug", shellname="avmshell_d", vmargs="", config="sparc-sol-tvm-debug-deep", scriptargs="--showtimes", _timeout=2400))
     solaris_sparc_deep_factory.addStep(test_generic(name="DebugDebugger", shellname="avmshell_sd", vmargs="", config="sparc-sol-tvm-debugdebugger-deep", scriptargs="--showtimes", _timeout=2400))
     solaris_sparc_deep_factory.addStep(deep_release_esc)
     solaris_sparc_deep_factory.addStep(test_misc)
     solaris_sparc_deep_factory.addStep(test_generic(name="Release-Dgreedy", shellname="avmshell", vmargs="-Dgreedy", config="", scriptargs="--timeout=180 --random"))
     solaris_sparc_deep_factory.addStep(test_generic(name="DebugDebugger_VerifyAll", shellname="avmshell_sd", vmargs="", config="", scriptargs="--verify --timeout=300 --random"))
     solaris_sparc_deep_factory.addStep(test_generic(name="DebugDebugger_VerifyOnly", shellname="avmshell_sd", vmargs="", config="", scriptargs="--verifyonly --timeout=300 --random"))
+    # Do a test run where we compile with -ES. MUST be the last step of the build as it recompiles the .abc files used by all the other steps
+    solaris_sparc_deep_factory.addStep(test_generic(name="Release_ES", shellname="avmshell", vmargs="", config="",
+                                              scriptargs="--ascargs=-no-AS3 --addtoconfig=-ES -f -x abcasm,ecma3,spidermonkey"))
     solaris_sparc_deep_factory.addStep(util_process_clean)
     solaris_sparc_deep_factory.addStep(util_clean_buildsdir)
     solaris_sparc_deep_factory.addStep(sync_clean)
 
     solaris_sparc_deep_builder = {
                 'name': "solaris-sparc-deep",
                 'slavename': "solaris-sparc-deep",
                 'factory': solaris_sparc_deep_factory,
@@ -2210,16 +2219,19 @@ class tamarinredux:
                 )
     )
     windows_64_deep_factory.addStep(test_misc)
     windows_64_deep_factory.addStep(test_generic(name="Release-Dgreedy", shellname="avmshell_64", vmargs="-Dgreedy", config="", scriptargs="--timeout=180 --random"))
     windows_64_deep_factory.addStep(test_generic(name="DebugDebugger_VerifyAll", shellname="avmshell_sd_64", vmargs="", config="", scriptargs="--verify --timeout=300 --random"))
     windows_64_deep_factory.addStep(test_generic(name="DebugDebugger_VerifyOnly", shellname="avmshell_sd_64", vmargs="", config="", scriptargs="--verifyonly --timeout=300 --random"))
     windows_64_deep_factory.addStep(deep_codecoverage(compilecsv="../all/codecoverage-compile.csv", testcsv="../all/codecoverage-test.csv"))
     windows_64_deep_factory.addStep(deep_codecoverage_process)
+    # Do a test run where we compile with -ES. MUST be the last step of the build as it recompiles the .abc files used by all the other steps
+    windows_64_deep_factory.addStep(test_generic(name="Release_ES", shellname="avmshell", vmargs="", config="",
+                                              scriptargs="--ascargs=-no-AS3 --addtoconfig=-ES -f -x abcasm,ecma3,spidermonkey"))
     windows_64_deep_factory.addStep(util_process_clean)
     windows_64_deep_factory.addStep(util_clean_buildsdir)
     windows_64_deep_factory.addStep(sync_clean)
 
     windows_64_deep_builder = {
                 'name': "windows64-deep",
                 'slavename': "windows64-deep",
                 'factory': windows_64_deep_factory,
@@ -2272,16 +2284,19 @@ class tamarinredux:
     linux_deep_factory.addStep(test_misc)
     linux_deep_factory.addStep(compile_generic(name="ReleaseDebugger-air", shellname="avmshell_air", args="--enable-shell --enable-override-global-new --enable-use-system-malloc --enable-debugger", upload="true", features="+AVMSYSTEM_32BIT +AVMSYSTEM_IA32 +AVMFEATURE_DEBUGGER +AVMFEATURE_OVERRIDE_GLOBAL_NEW +AVMFEATURE_USE_SYSTEM_MALLOC"))
     linux_deep_factory.addStep(test_generic(name="ReleaseDebugger-air", shellname="avmshell_air", vmargs="", config="", scriptargs=""))
     linux_deep_factory.addStep(test_generic(name="Release-Dgreedy", shellname="avmshell", vmargs="-Dgreedy", config="", scriptargs="--timeout=180 --random"))
     linux_deep_factory.addStep(test_generic(name="DebugDebugger_VerifyAll", shellname="avmshell_sd", vmargs="", config="", scriptargs="--verify --timeout=300 --random"))
     linux_deep_factory.addStep(test_generic(name="DebugDebugger_VerifyOnly", shellname="avmshell_sd", vmargs="", config="", scriptargs="--verifyonly --timeout=300 --random"))
     linux_deep_factory.addStep(deep_codecoverage(compilecsv="../all/codecoverage-compile.csv", testcsv="../all/codecoverage-test.csv"))
     linux_deep_factory.addStep(deep_codecoverage_process)
+    # Do a test run where we compile with -ES. MUST be the last step of the build as it recompiles the .abc files used by all the other steps
+    linux_deep_factory.addStep(test_generic(name="Release_ES", shellname="avmshell", vmargs="", config="",
+                                              scriptargs="--ascargs=-no-AS3 --addtoconfig=-ES -f -x abcasm,ecma3,spidermonkey"))
     linux_deep_factory.addStep(util_process_clean)
     linux_deep_factory.addStep(util_clean_buildsdir)
     linux_deep_factory.addStep(sync_clean)
 
     linux_deep_builder = {
                 'name': "linux-deep",
                 'slavename': "linux-deep",
                 'factory': linux_deep_factory,
--- a/build/buildbot/slaves/all/codecoverage-test.csv
+++ b/build/buildbot/slaves/all/codecoverage-test.csv
@@ -1,8 +1,9 @@
 shell_name, suite, vm_args, config_string, script_args
 avmshell_cov, acceptance, , , 
 avmshell_cov, acceptance, -Dinterp, , 
 avmshell_cov, acceptance, -Ojit, , 
 avmshell_s_cov, acceptance, , , 
 avmshell_d_cov, acceptance, , , 
 avmshell_sd_cov, acceptance, , , 
 avmshell_cov, selftest, , , 
+avmshell_cov, acceptance, , ,"--ascargs=-no-AS3 --addtoconfig=-ES -f -x abcasm,ecma3,spidermonkey"
\ No newline at end of file
--- a/test/acceptance/as3/RuntimeErrors/Error1034TypeCoercionFailed.as
+++ b/test/acceptance/as3/RuntimeErrors/Error1034TypeCoercionFailed.as
@@ -37,18 +37,18 @@
 var CODE = 1034; //	Type Coercion failed: cannot convert _ to _.
 
 //-----------------------------------------------------------
 startTest();
 //-----------------------------------------------------------
 
 try {
 	var result = "no error";
-	this.setTime = new Date().getDate;
-	this.setTime(-1);
+	f = function (arg):Function {return arg;};
+    f({});
 } catch (err) {
 	result = err.toString();
 	trace(err);
 } finally {
 	AddTestCase("Runtime Error", TYPEERROR + CODE, typeError(result));
 }
 
 //-----------------------------------------------------------
--- a/test/acceptance/as3/Vector/sort.as
+++ b/test/acceptance/as3/Vector/sort.as
@@ -75,20 +75,28 @@ CheckItems(vs1,vs2,"sort()");
 var v1=new Vector.<int>();
 for (var i=0;i<10;i++) v1[i]=9-i;
 var errormsg="";
 try {
   v1.sort()
 } catch (e) {
   errormsg=e.toString();
 }
-AddTestCase(
+
+if (as3Enabled()) {
+    AddTestCase(
+   "sort vector without setting compare function throws exception",
+   "ArgumentError: Error #1063",
+   parseError(errormsg,"ArgumentError: Error #1063".length));
+} else {
+    AddTestCase(
    "sort vector without setting compare function throws exception",
    "TypeError: Error #1034",
    parseError(errormsg,"TypeError: Error #1034".length));
+}
 
 class TestClass {
     private var myVal:Object;
     public function TestClass(v:Object):void {
         myVal = v;
     }
     public function toString():String {
         return myVal.toString();
--- a/test/acceptance/as3/Vector/sortInitializers.as
+++ b/test/acceptance/as3/Vector/sortInitializers.as
@@ -55,20 +55,30 @@ var TITLE   = "Vector.sort(comparefn)";
 writeHeaderToLog( SECTION + " "+ TITLE);
 
 var errormsg="";
 try {
   new<int>[4,92,1].sort()
 } catch (e) {
   errormsg=e.toString();
 }
-AddTestCase(
+
+if (as3Enabled()) {
+    AddTestCase(
+   "sort vector without setting compare function throws exception",
+   "ArgumentError: Error #1063",
+   parseError(errormsg,"ArgumentError: Error #1063".length));
+} else {
+    AddTestCase(
    "sort vector without setting compare function throws exception",
    "TypeError: Error #1034",
    parseError(errormsg,"TypeError: Error #1034".length));
+}
+
+
 
 AddTestCase(
     "sort vector",
     "-12,2,17,56,999",
     new<Number>[999,2,56,-12,17].sort(Compare).toString());
 
 
 test();
--- a/test/acceptance/dir.asc_args
+++ b/test/acceptance/dir.asc_args
@@ -1,6 +1,6 @@
 # ASC args for directory and all subdirectories
 # two modes are available:
 # override| all command line arguments (except builtin.abc) are ignored and replaced by these
 # merge| merge these args in with the current args
 # specifiy an arg that starts with -no will disable the arg... eg: -no-optimize
-merge| -optimize
+merge| -AS3 -optimize
new file mode 100644
--- /dev/null
+++ b/test/acceptance/ecma3/dir.asc_args
@@ -0,0 +1,6 @@
+# ASC args for directory and all subdirectories
+# two modes are available:
+# override| all command line arguments (except builtin.abc) are ignored and replaced by these
+# merge| merge these args in with the current args
+# specifiy an arg that starts with -no will disable the arg... eg: -no-optimize
+merge| -no-AS3
--- a/test/acceptance/runtests.py
+++ b/test/acceptance/runtests.py
@@ -202,22 +202,16 @@ class AcceptanceRuntest(RuntestBase):
                 sys.exit(1)
             print("detected %d android devices" % (len(self.androiddevices)/self.threads))
             self.threads=len(self.androiddevices)
      
     def runTestPrep(self, testAndNum):
         ast = testAndNum[0]
         testnum = testAndNum[1]
         outputCalls = [] #queue all output calls so that output is written in a block
-        lpass = 0
-        lfail = 0
-        lexpfail = 0
-        lunpass = 0
-        ltimeout = 0
-        lassert = 0
         extraVmArgs = ''
         abcargs = ''
 
         dir = os.path.split(ast)[0]
         root,ext = splitext(ast)
         if self.runSource or self.eval or ext in self.executableExtensions:
             testName = ast
         else:
@@ -242,54 +236,41 @@ class AcceptanceRuntest(RuntestBase):
             return outputCalls
 
         # delete abc if forcerebuild
         if self.forcerebuild and isfile(testName) and ext not in self.executableExtensions:
             os.unlink(testName)
         if isfile(testName) and getmtime(ast)>getmtime(testName) and self.timestampcheck:
             outputCalls.append((self.verbose_print, ("%s has been modified, recompiling" % ast,)))
             os.unlink(testName)
+        
         # process support dir
         if exists(root+self.supportFolderExt):
-            for p, dirs, files in walk(root+self.supportFolderExt):
-                for f in files:
-                    if f.endswith(self.sourceExt):
-                        f = p+'/'+f
-                        binFile = splitext(f)[0]+'.abc'
-                        if exists(binFile) and (self.forcerebuild or (self.timestampcheck and getmtime(f)>getmtime(binFile))):
-                            os.unlink(binFile)
-                        if not isfile(binFile):
-                            compileOutput = self.compile_test(f, outputCalls=outputCalls)
-                            if not isfile(binFile):
-                                outputCalls.append((self.js_print,('  Error compiling support file: %s' % f,)))
-                                outputCalls.append((self.verbose_print, ('   compile output: %s' % compileOutput,)))
+            self.compile_support_files(root+self.supportFolderExt, outputCalls)
+        
+        # compile file if needed
         if not isfile(testName):
             compileOutput = self.compile_test(ast, outputCalls=outputCalls)
             if not isfile(testName):
                 if ast.endswith(self.abcasmExt):
                     # file didn't compile, compare compile output
                     flines = self.compareAbcAsmOutput(ast, compileOutput)
                     if flines:
-                        lfail += 1
+                        self.allfails += 1
                         outputCalls.append((self.fail,(testName, 'FAILED! :\nExpected:\n'+''.join(flines)+'\nGOT:\n'+''.join(compileOutput), self.failmsgs)))
-                        outputCalls.append((self.js_print, ('   FAILED passes:%d fails:%d unexpected passes: %d expected failures: %d' % (lpass,lfail,lunpass,lexpfail), '', '<br/>')))
+                        outputCalls.append((self.js_print, ('   FAILED passes: 0 fails: 1 unexpected passes: 0 expected failures: 0', '', '<br/>')))
                     else:
-                        lpass += 1
-                        outputCalls.append((self.verbose_print, ('   PASSED passes:%d fails:%d unexpected passes: %d expected failures: %d' % (lpass,lfail,lunpass,lexpfail), '', '<br/>')))
+                        self.allpasses += 1
+                        outputCalls.append((self.verbose_print, ('   PASSED passes: 1 fails: 0 unexpected passes: 0 expected failures: 0', '', '<br/>')))
                     outputCalls.insert(0,(self.js_print,('%d running %s' % (testnum, ast), '<b>', '</b><br/>')));
-                    self.allfails += lfail
-                    self.allpasses += lpass
                     return outputCalls
                 else:
-                    lfail += 1
+                    self.allfails += 1
                     outputCalls.append((self.fail,(testName, 'FAILED! file not found ' + testName, self.failmsgs)))
 
-        self.allfails += lfail
-        self.allpasses += lpass
-
         if self.runSource or self.eval:
             incfiles=self.build_incfiles(testName)
             incfiles.append("shell" + self.sourceExt)
             for incfile in incfiles:
                 testName=incfile+" "+testName
 
         # read any extra avm arguments, each line will execute the avm with those args
         if isfile('%s.avm_args' % ast):
@@ -315,16 +296,30 @@ class AcceptanceRuntest(RuntestBase):
                     continue
                 line, extraVmArgs, abcargs = self.process_avm_args_line(line, dir)
                 outputCalls.extend(self.runTest(ast, root, testName, '%s.%s' % (testnum, index), settings, extraVmArgs, abcargs))
         else:
             outputCalls.extend(self.runTest(ast, root, testName, testnum, settings))
 
         return outputCalls
 
+    def compile_support_files(self, support_dir, outputCalls):
+        for p, dirs, files in walk(support_dir):
+            for f in files:
+                if f.endswith(self.sourceExt):
+                    f = join(p,f)
+                    binFile = splitext(f)[0]+'.abc'
+                    if exists(binFile) and (self.forcerebuild or (self.timestampcheck and getmtime(f)>getmtime(binFile))):
+                        os.unlink(binFile)
+                    if not isfile(binFile):
+                        compileOutput = self.compile_test(f, outputCalls=outputCalls)
+                        if not isfile(binFile):
+                            outputCalls.append((self.js_print,('  Error compiling support file: %s' % f,)))
+                            outputCalls.append((self.verbose_print, ('   compile output: %s' % compileOutput,)))
+
     def process_avm_args_line(self, line, dir):
         abcargs = ''
         line = string.replace(line, "$DIR", dir)
         if line.find('--') != -1:
             (extraVmArgs, abcargs) = line.split('--')
         else:
             extraVmArgs = line
         return line, extraVmArgs, abcargs
--- a/test/acceptance/shell.as
+++ b/test/acceptance/shell.as
@@ -271,16 +271,20 @@ function writeFormattedResult( expect, a
 function writeLineToLog( string	) {
 	_print( string );
 }
 function writeHeaderToLog( string )	{
 	_print( string );
 }
 // end of print functions
 
+function as3Enabled():Boolean {
+    // return whether the test was compiled with -AS3
+    return ((new Boolean()).valueOf != Boolean.prototype.valueOf)
+}
 
 
 //  When running in the shell, run the garbage collector after the
 //  test has completed.
 
 function stopTest(){
     // Call ATS Function if not running in AVM
     if (playerType != 'AVMPlus') {
new file mode 100644
--- /dev/null
+++ b/test/acceptance/spidermonkey/dir.asc_args
@@ -0,0 +1,6 @@
+# ASC args for directory and all subdirectories
+# two modes are available:
+# override| all command line arguments (except builtin.abc) are ignored and replaced by these
+# merge| merge these args in with the current args
+# specifiy an arg that starts with -no will disable the arg... eg: -no-optimize
+merge| -no-AS3
--- a/test/acceptance/testconfig.txt
+++ b/test/acceptance/testconfig.txt
@@ -146,16 +146,20 @@ ecma3/Number/e15_7_4_7_1:Section R-1 , ^
 ecma3/String/split_504567:'abab',    ^((?!diff).)*$   , expectedfail, bug https://bugzilla.mozilla.org/show_bug.cgi?id=504567
 ecma3/String/split_504567:'babab',   ^((?!diff).)*$   , expectedfail, bug https://bugzilla.mozilla.org/show_bug.cgi?id=504567
 
 ####################
 # Vector
 ####################
 as3/Vector/concat:concat multiple int vectors, .*, expectedfail, https://bugzilla.mozilla.org/show_bug.cgi?id=504525
 
+# vector/map passes w/ asc -ES but fails with -AS3 - skip due to differing behavior
+as3/Vector/map      , ^((?!-ES).)*$ , expectedfail , https://bugzilla.mozilla.org/show_bug.cgi?id=574600
+as3/Vector/mapInitializers, ^((?!-ES).)*$ , expectedfail , https://bugzilla.mozilla.org/show_bug.cgi?id=574600
+
 ####################
 # Array
 ####################
 as3/Array/deleteElementWhileIterating, .*, expectedfail, https://bugzilla.mozilla.org/show_bug.cgi?id=553088
 as3/Array/forEach:callbackfn is called only for elements of the array.*, .* , expectedfail, https://bugzilla.mozilla.org/show_bug.cgi?id=553088
 as3/Array/forEach:elements that are deleted.*, .* , expectedfail, https://bugzilla.mozilla.org/show_bug.cgi?id=553088
 as3/Array/forEach:If IsCallable\(callbackfn\) is false.*, .*, expectedfail, need to file bug
 
@@ -300,16 +304,17 @@ regress/bug_555705, .*-Dverifyall.*, ski
 # Sampling
 ####################
 # Assertion failed: "(((start_event == (PolicyEvent)(ev - 1))))" (".\\GC.cpp":461)
 # Disabling test until this can be properly investigated
 # Re-enabling to get a better diagnosis; I've made it print a better error.  --lars
 # as3/sampling/Callback:.* ,  .* ,  skip , https://bugzilla.mozilla.org/show_bug.cgi?id=507685
 # ProcessSampling:GetSizeSamples intermittently fails
 as3/sampling/ProcessSampling ,  .* ,  skip , https://bugzilla.mozilla.org/show_bug.cgi?id=476864
+as3/sampling/Callback:Callback: callback called.*, ^((?!-ES).)*$, expectedfail, https://bugzilla.mozilla.org/show_bug.cgi?id=603814
 
 ####################
 # ATS Skipped tests - These tests will not be exported when generating ATS swfs
 ####################
 misc/isGlobalObject.as, .*, ats_skip, uses avmplus.System.isGlobal
 regress/vector_domain_bug.as, .*, ats_skip, uses avmplus::Domain
 as3/ShellClasses/.*, .*, ats_skip, Tests avmplus ShellClasses
 as3/sampling/.*, .*, ats_skip, sampling tests
--- a/test/util/runtestBase.py
+++ b/test/util/runtestBase.py
@@ -81,18 +81,21 @@ except ImportError:
     pexpect = False
 
 
 class RuntestBase:
     abcasmExt = '.abs'
     abcasmRunner = 'bash ../../utils/abcasm/abcasm.sh'
     abcasmShell = 'abcasm/abs_helper'
     abcdump = '../../utils/abcdump'
+    addtoconfig = ''
     asc = ''
     ascargs = ''
+    # list of args to remove defined using -no-argname format in --ascargs
+    asc_negative_args = []
     atsDir = 'ATS_SWFS'
     ascversion = ''
     avm = ''
     avmce = ''
     avmversion = ''
     avm_features = ''
     builtinabc = ''
     config = ''
@@ -195,23 +198,25 @@ class RuntestBase:
         print ' -g --globalabc     DEPRECATED but still works - use builtin.abc (used to be location of global.abc)'
         print ' -b --builtinabc    location of builtin.abc'
         print ' -s --shellabc      location of shell_toplevel.abc'
         print ' -x --exclude       comma separated list of directories to skip'
         print ' -h --help          display help and exit'
         print ' -t --notime        do not generate timestamps (cleaner diffs)'
         print ' -f --forcerebuild  force rebuild all test files'
         print ' -c --config        sets the config string [default OS-tvm]'
+        print '    --addtoconfig   add string to default config'
         print ' -q --quiet         display minimum output during testrun'
         print ' -l --log           also log all output to given logfile'
         print '    --valgrind      run tests under valgrind'
         print '    --summaryonly   only display final summary'
         print '    --rebuildtests  rebuild the tests only - do not run against VM'
         print '    --showtimes     shows the time for each test'
         print '    --ascargs       args to pass to asc on rebuild of test files'
+        print '                    can also pass in -no-Argname to remove arg'
         print '    --vmargs        args to pass to vm'
         print '    --timeout       max time to run all tests'
         print '    --testtimeout   max time to let a test run, in sec (default -1 = never timeout)'
         print '    --html          also create an html output file'
         print '    --notimecheck   do not recompile .abc if timestamp is older than .as'
         print '    --java          location of java executable (default=java)'
         print '    --javaargs      arguments to pass to java'
         print '    --random        run tests in random order'
@@ -227,17 +232,17 @@ class RuntestBase:
         '''set the valid command line options.
             When subclassing, call this method first, then append options to each list'''
         self.options = 'vE:a:g:b:s:x:htfc:dql:'
         self.longOptions = ['verbose','avm=','asc=','globalabc=','builtinabc=','shellabc=',
                    'exclude=','help','notime','forcerebuild','config=','ascargs=','vmargs=',
                    'aotsdk=', 'aotout=', 'aotargs=', 'remoteip=', 'remoteuser=',
                    'timeout=','testtimeout=', 'rebuildtests','quiet','notimecheck',
                    'showtimes','java=','html','random', 'seed=', 'playerglobalabc=', 'toplevelabc=',
-                   'javaargs=', 'summaryonly', 'log=', 'valgrind'
+                   'javaargs=', 'summaryonly', 'log=', 'valgrind', 'addtoconfig='
                    ]
 
     def parseOptions(self):
         try:
             opts, self.args = getopt(argv[1:], self.options, self.longOptions )
         except:
             self.usage(2)
 
@@ -264,16 +269,18 @@ class RuntestBase:
                 self.exclude = map(lambda s: s.rstrip('\\/ '), self.exclude)
             elif o in ('-t', '--notime'):
                 self.timestamps = False
             elif o in ('-f', '--forcerebuild'):
                 self.forcerebuild = True
                 self.ascversion = self.getAscVersion(self.asc)
             elif o in ('-c', '--config'):
                 self.config = v
+            elif o in ('--addtoconfig',):
+                self.addtoconfig = v
             elif o in ('--ascargs',):
                 self.ascargs = v
             elif o in ('--vmargs',):
                 self.vmargs = v
             elif o in ('--ext',):
                 self.sourceExt = v
             elif o in ('--timeout',):
                 try:
@@ -454,17 +461,18 @@ class RuntestBase:
 
         # need to also check for wordcode in the avm name for winmo
         if re.search('AVMFEATURE_WORDCODE_INTERP', self.avm_features) \
            or re.search('wordcode', self.avm):
             wordcode = '-wordcode'
         else:
             wordcode = ''
             
-        self.config = cputype+'-'+self.osName+'-'+vm_str+'-'+self.vmtype+wordcode+self.vmargs.replace(" ", "")
+        self.config = cputype+'-'+self.osName+'-'+vm_str+'-'+self.vmtype+ \
+                      wordcode+self.addtoconfig+self.vmargs.replace(" ", "")
         
         
 
     def determineOS(self):
         _os = platform.system()
         ostype = ''
         # When running on a windows system we can either be running with cygwin python
         # or with a windows-native python.  Legacy code requires that ostype be kept
@@ -742,16 +750,22 @@ class RuntestBase:
     def parseRootConfigFiles(self):
         # Load any root .asc_args and .java_args files so they don' have to be
         # loaded over and over again when compiling tests
 
         # Loads root asc_args file and modifies arglist accordingly
 
         if isfile('./dir.asc_args'):  # load root dir.asc_args
             ascArgsList = parseArgStringToList(self.ascargs)
+            # seperate out the negative args
+            for arg in ascArgsList:
+                if arg[0:3].lower() == '-no':
+                    self.asc_negative_args.append(arg[3:])
+                # delete the -no arg from the list
+                ascArgsList.remove(arg)
             ascArgsList = self.parseAscArgs(ascArgsList, './dir.asc_args', './')
             self.ascargs = ' '.join(ascArgsList)
 
 
         # Loads root asc_args file and modifies arglist accordingly
         if isfile('./dir.java_args'):  # load root dir.java_args
             javaArgsList = parseArgStringToList(self.javaargs)
             javaArgsList = self.parseAscArgs(javaArgsList, './dir.java_args', './')
@@ -872,18 +886,16 @@ class RuntestBase:
                 self.js_print('ATS Skipping %s ... reason: %s' % (file,settings['.*']['ats_skip']))
                 return
 
         # additional .as file compiler args
         if as_file.endswith(self.sourceExt):
             if not isfile(builtinabc):
                 exit('ERROR: builtin.abc (formerly global.abc) %s does not exist, BUILTINABC environment variable or --builtinabc must be set to builtin.abc' % builtinabc)
 
-
-
             javaArgList = parseArgStringToList(self.javaargs)
             javaArgList = self.loadArgsFile(javaArgList, dir, as_file, 'java_args')
 
             if asc.endswith('.jar'):
                 cmd = self.java
                 for arg in javaArgList:
                     cmd += ' %s' % arg
                 cmd += ' -jar %s' %  asc
@@ -1077,20 +1089,20 @@ class RuntestBase:
             ascargs[0] = 'merge'
         # replace the $DIR keyword with actual directory
         ascargs[1] = string.replace(ascargs[1], '$DIR', currentdir)
         if ascargs[1].find('$SHELLABC') != -1:
             if not isfile(self.shellabc):   # TODO: not the best place to check for this
                 exit('ERROR: shell.abc %s does not exist, SHELLABC environment variable or --shellabc must be set to shell_toplevel.abc' % self.shellabc)
             ascargs[1] = string.replace(ascargs[1], '$SHELLABC', self.shellabc)
         ascargs[1] = parseArgStringToList(ascargs[1])
-        removeArgList = []
+        removeArgList = self.asc_negative_args[:]   # get a copy of the negative args list
         argList = []
         for a in ascargs[1]:
-            if a[0:3] == '-no':
+            if a[0:3].lower() == '-no':
                 removeArgList.append(a[3:])
             else:
                 argList.append(a)
 
         mode = ascargs[0]
         if mode == 'merge':
             currentArgList.extend(argList)
         elif mode == 'override':