mx unittest with @javaCompliance=1.8
    Deneau, Tom 
    tom.deneau at amd.com
       
    Fri May 10 13:23:19 PDT 2013
    
    
  
We added a project locally here and marked it with @javaCompliance=1.8
(test cases in this project use lambdas)
With that annotation mx build product seems to work fine, it builds that project
if the java_home is 1.8, but not 1.7.  And if 1.8 is used, we can
use mx unittest to run the test cases in that project.
However, we had a user who was still using 1.7 and  after updating to this new projects file,
got the following experience
> mx build product   # worked fine, did not built the 1.8 project
> mx unittest IntSquaredTest 
  # note: IntSquaredTest is in one of the normal 1.7 projects
got the error shown below.  So it looks like unittest at least is ignoring
the fact that this project is 1.8 and looking for its bin directory even though
we are using a 1.7 jvm...
Traceback (most recent call last):
  File "/home/tom/graal/mxtool/mx.py", line 3191, in <module>
    main()
  File "/home/tom/graal/mxtool/mx.py", line 3180, in main
    retcode = c(command_args)
  File "/home/tom/graal/mx/commands.py", line 839, in unittest
    _unittest(args, ['@Test', '@LongTest'])
  File "/home/tom/graal/mx/commands.py", line 827, in _unittest
    _run_tests(args, harness, annotations, testfile)
  File "/home/tom/graal/mx/commands.py", line 791, in _run_tests
    classes += _find_classes_with_annotations(p, None, annotations).keys()
  File "/home/tom/graal/mx/commands.py", line 776, in _find_classes_with_annotations
    return p.find_classes_with_matching_source_line(pkgRoot, matches, includeInnerClasses)
  File "/home/tom/graal/mxtool/mx.py", line 343, in find_classes_with_matching_source_line
    for e in os.listdir(pkgOutputDir):
OSError: [Errno 2] No such file or directory: '/home/tom/graal/graal/com.oracle.graal.compiler.hsail.test.lambda/bin/com/oracle/graal/compiler/hsail/test/lambda'
-- Tom Deneau
    
    
More information about the graal-dev
mailing list