changeset 17361:6b1eed55ea66

Merge.
author Doug Simon <doug.simon@oracle.com>
date Tue, 07 Oct 2014 13:46:29 +0200
parents d044ca4a1cdc (diff) bf84afcd4b40 (current diff)
children 03eef43d364f
files
diffstat 2 files changed, 17 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.debug.test/src/com/oracle/graal/debug/test/DebugTimerTest.java	Fri Oct 03 15:50:08 2014 +0200
+++ b/graal/com.oracle.graal.debug.test/src/com/oracle/graal/debug/test/DebugTimerTest.java	Tue Oct 07 13:46:29 2014 +0200
@@ -112,10 +112,13 @@
             DebugTimer timerD = Debug.timer("TimerD");
             DebugTimer timerE = Debug.timer("TimerE");
 
+            long spinD1;
+            long spinE;
+
             try (TimerCloseable d1 = timerD.start()) {
-                spin(50);
+                spinD1 = spin(50);
                 try (TimerCloseable e1 = timerE.start()) {
-                    spin(50);
+                    spinE = spin(50);
                     try (TimerCloseable d2 = timerD.start()) {
                         spin(50);
                         try (TimerCloseable d3 = timerD.start()) {
@@ -127,7 +130,7 @@
 
             Assert.assertTrue(timerE.getCurrentValue() < timerD.getCurrentValue());
             if (timerD.getFlat() != null && timerE.getFlat() != null) {
-                assertTrue(timerE.getFlat().getCurrentValue() < timerD.getFlat().getCurrentValue());
+                assertTrue(spinE >= spinD1 || timerE.getFlat().getCurrentValue() < timerD.getFlat().getCurrentValue());
                 assertEquals(timerD.getFlat().getCurrentValue(), timerD.getCurrentValue() - timerE.getFlat().getCurrentValue(), 10D);
             }
         }
--- a/mx/mx_graal.py	Fri Oct 03 15:50:08 2014 +0200
+++ b/mx/mx_graal.py	Tue Oct 07 13:46:29 2014 +0200
@@ -1794,12 +1794,18 @@
         graalSuite = mx.suite("graal")
         path = artifactId + '.jar'
         if args.permissive:
+            allDeps = []
             for name in deps:
-                if not mx.project(name, fatalIfMissing=False):
-                    if not mx.library(name, fatalIfMissing=False):
-                        mx.log('Skipping ' + groupId + '.' + artifactId + '.jar as ' + name + ' cannot be resolved')
-                        return
-        d = mx.Distribution(graalSuite, name=artifactId, path=path, sourcesPath=path, deps=deps, mainClass=None, excludedDependencies=[], distDependencies=[])
+                dist = mx.distribution(name, fatalIfMissing=False)
+                if dist:
+                    allDeps = allDeps + [d.name for d in dist.sorted_deps(transitive=True)]
+                else:
+                    if not mx.project(name, fatalIfMissing=False):
+                        if not mx.library(name, fatalIfMissing=False):
+                            mx.log('Skipping dependency ' + groupId + '.' + artifactId + ' as ' + name + ' cannot be resolved')
+                            return
+                    allDeps.append(name)
+        d = mx.Distribution(graalSuite, name=artifactId, path=path, sourcesPath=path, deps=allDeps, mainClass=None, excludedDependencies=[], distDependencies=[], javaCompliance=None)
         d.make_archive()
         cmd = ['mvn', 'install:install-file', '-DgroupId=' + groupId, '-DartifactId=' + artifactId,
                '-Dversion=1.0-SNAPSHOT', '-Dpackaging=jar', '-Dfile=' + d.path]