Fix for AOT shell acceptance compilation that requires imported abc files to be in a specific order.
authorBrent Baker <brbaker@adobe.com>
Mon, 22 Oct 2012 10:47:47 -0700
changeset 7568 165e49235c6b
parent 7567 c22a2f1de742
child 7569 d391629fbd64
push id4262
push userdschaffe@adobe.com
push dateWed, 30 Jan 2013 19:01:31 +0000
bugs1127690
Fix for AOT shell acceptance compilation that requires imported abc files to be in a specific order. WE3347471 CL@1127690
test/util/runtestBase.py
--- a/test/util/runtestBase.py
+++ b/test/util/runtestBase.py
@@ -1303,27 +1303,32 @@ class RuntestBase(object):
                         self.js_print('AOT compiling %s' % (testdir+".abc_"))
                         (f,err,exitcode) = self.compile_aot(test)
                         if exitcode != 0:
                             self.js_print("ERROR: AOT compilation failed for %s" % (testdir+".abc_"))
                             [self.js_print(line) for line in err]
                             self.ashErrors.append("AOT compilation failed for %s\n\t%s" % (testdir+".abc_", '\n'.join(str(x) for x in err)))
                     continue
                 else:
-                    extraVmArgs=_extraVmArgs=''
+                    extraAscArgs=_extraAscArgs=''
+                    extraABCs=[]
+                    _extraABCs=''
                     outputCalls=[]
                     if os.path.exists(testdir):
                         self.compile_support_files(testdir, outputCalls)
                         for testfile in glob(join(testdir,'*.abc')):
-                            _extraVmArgs += ' %s' % testfile
-                        if 'Interface' in extraVmArgs:
-                            _extraVmArgs = self.sortInterfaces(extraVmArgs)
-                    for abcfile in _extraVmArgs.split():
-                        extraVmArgs+=' -import %s' % abcfile
-
+                            _extraABCs += ' %s' % testfile
+                            _extraAscArgs += ' %s' % testfile
+                        if 'Interface' in _extraAscArgs:
+                            _extraAscArgs = self.sortInterfaces(_extraAscArgs)
+                            _extraABCs = self.sortInterfaces(_extraABCs)
+                    for abcfile in _extraAscArgs.split():
+                        extraAscArgs+=' -import %s' % abcfile
+                    extraABCs = _extraABCs.split();
+                    
                     arglist = parseArgStringToList(self.ascargs)
 
                     # Check for a local .java_args file (either dir or file specific)
                     # Not ideal - but we try to load a .java_args file, and if one is loaded, then we revert to compiling
                     # without ash, as there is no way to pass new java args to the already running ash process
                     javaArgList = []
                     javaArgList = self.loadArgsFile(javaArgList, dir, test, 'java_args')
                     if javaArgList:
@@ -1336,17 +1341,17 @@ class RuntestBase(object):
                         if self.genAtsSwfs:
                             # get settings as ats excluded files are defined there
                             settings = self.get_test_settings(testdir)
                             if self.skipAtsTest(file, settings):
                                 continue
                             arglist.extend(genAtsArgs(dir,file,self.atstemplate))
 
                         cmd = "asc -import %s " % (self.builtinabc)
-                        cmd += extraVmArgs
+                        cmd += extraAscArgs
                         for arg in arglist:
                             cmd += ' %s' % arg
 
                         if exists(testdir+".abc"):
                             os.unlink(testdir+".abc")
 
                         if self.genAtsSwfs:
                             if search_file(test+'.avm_args', 'USES_SWFVERSION'):
@@ -1394,17 +1399,17 @@ class RuntestBase(object):
                     #print("%d remaining, %s" % (total,cmd))
 
                 if self.aotsdk: # ABC compiled, so now AOT compile
                     # Need to figure out how to deal with additional required abc files
                     if self.show_time:
                         start_time=time()
                     else:
                         self.js_print('AOT compiling %s' % (testdir+".abc"))
-                    (f,err,exitcode) = self.compile_aot(testdir+".abc")
+                    (f,err,exitcode) = self.compile_aot(testdir+".abc", extraABCs)
                     if self.show_time:
                         self.js_print('AOT compiling %s %.1f' % (testdir+".abc",time()-start_time))
                     if exitcode != 0:
                         self.js_print("ERROR: AOT compilation failed for %s" % (testdir+".abc"))
                         [self.js_print(line) for line in err]
                         self.ashErrors.append("AOT compilation failed for %s\n\t%s" % (testdir+".abc", '\n'.join(str(x) for x in err)))