qickrooms / flex-mojos

Automatically exported from code.google.com/p/flex-mojos
0 stars 0 forks source link

Test's won't run on Mac OS X 10.4.11 #151

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
When using 2.0M10 to run FlexUnit tests on OS X, the Flash Player will fail
to start.

mvn -X reveals that the command used by default is "open -g". This appears
to be the root of the problem - the "open" command on Mac OS X 10.4.11 does
not support a -g parameter and fails when it receives one.

To prove the point, providing the following in the pom fixes the issue:
<plugin>
  <groupId>info.flex-mojos</groupId>
  <artifactId>flex-compiler-mojo</artifactId>
  <version>2.0M10</version>
  <extensions>true</extensions>
  <configuration>
    <flexUnitCommand>
      <command>open</command>
    </flexUnitCommand>
  </configuration>
<plugin>

However, I need my tests to run cross platform (Windows and Mac), so this
is not an option.

I guess I could do something with OS specific profiles, but I'd prefer it
if the mojo sorted it out.

Original issue reported on code.google.com by simon.le...@shopdirect.com on 18 Dec 2008 at 10:51

GoogleCodeExporter commented 9 years ago
OS-specific profiles is the designed way of customizing the flexUnitCommand, 
but we're open to suggestions on 
how the handle this elegantly.

I'll fix it so it doesn't use the -g parameter on Tiger.

Original comment by RedB...@gmail.com on 19 Dec 2008 at 4:51

GoogleCodeExporter commented 9 years ago
Yes, I've worked around with OS Specific profile at the moment, but there are
limitations - how do I override the command for all os version 10.4.*, or 
everything
but 10.5.* ?

I can override for 10.4.11 or !10.5.6 but I can't see how to do it for the 
generic
case of 10.4 or !10.5 using OS-specific profiles as they stand. I'll gladly use 
the
profile approach if I can get down to major OS release somehow.

Original comment by simon.le...@shopdirect.com on 19 Dec 2008 at 9:11

GoogleCodeExporter commented 9 years ago
You can write the command on settings.xml, so it is per machine and avoid this 
kind
of problem.

I dislike using it, but is a good alternative.

Original comment by velo...@gmail.com on 19 Dec 2008 at 10:09

GoogleCodeExporter commented 9 years ago
Looks like you are correct. The OS version activation is pretty useless. I 
expected it to take version ranges just 
the enforcer plugin does, but no such luck.

I would just change all mac invocations to use open without the -g. All the -g 
does is launch FP in the 
background instead of the foreground. If you're running FP 10, it won't launch 
in the background anyway, so 
it's not even useful there.

The only other option is to use settings.xml to set a property or special 
profile just for the 10.4 machines, or 
find an environment variable that will only trigger on 10.4

Original comment by RedB...@gmail.com on 19 Dec 2008 at 10:10

GoogleCodeExporter commented 9 years ago
OK. A settings.xml per 10.4 machine looks like a good approach for this kind of
problem, in the absence of wilcard/regexp support in profile activation. It at 
least
gets it out of the pom and lets me force the change in pre-Leopard machines 
with an
always active profile.

This is for an internal project so I at least have a closed community to worry 
about.

Thanks all for your help.

Original comment by simon.le...@shopdirect.com on 19 Dec 2008 at 11:23

GoogleCodeExporter commented 9 years ago

Original comment by velo...@gmail.com on 21 Jan 2009 at 7:19