Closed Bug 952786 Opened 11 years ago Closed 10 years ago

Make it possible to run XPCshell tests locally again

Categories

(Thunderbird :: Testing Infrastructure, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: mconley, Unassigned)

References

Details

I'm currently unable to run xpcshell tests locally. Attempting to do so results in something like this:

Mikes-MacBook-Pro-2:objdir-tb mikeconley$ make xpcshell-tests TEST_PATH=toolkit/components/telemetry/tests
make -C mozilla xpcshell-tests
Have you considered running xpcshell tests via |mach xpcshell-test|? mach is easier to use and has more features than make and it will eventually be the only way to run xpcshell tests. Please consider using mach today!
/Users/mikeconley/Projects/comm-central/objdir-tb/mozilla/_virtualenv/bin/python -u /Users/mikeconley/Projects/comm-central/mozilla/config/pythonpath.py \
	  -I./build \
	  -I/Users/mikeconley/Projects/comm-central/mozilla/build \
	  -I./_tests/mozbase/mozinfo \
	  /Users/mikeconley/Projects/comm-central/mozilla/testing/xpcshell/runxpcshelltests.py \
	  --manifest=./_tests/xpcshell/xpcshell.ini \
	  --build-info-json=./mozinfo.json \
	  --no-logfiles \
	  --test-plugin-path='./dist/plugins' \
	  --tests-root-dir=/Users/mikeconley/Projects/comm-central/objdir-tb/mozilla/_tests/xpcshell \
	  --testing-modules-dir=/Users/mikeconley/Projects/comm-central/objdir-tb/mozilla/_tests/modules \
	  --xunit-file=/Users/mikeconley/Projects/comm-central/objdir-tb/mozilla/_tests/xpcshell/results.xml \
	  --xunit-suite-name=xpcshell \
          --symbols-path=./dist/crashreporter-symbols \
	  --test-path='toolkit/components/telemetry/tests'  \
	  /Users/mikeconley/Projects/comm-central/objdir-tb/mozilla/dist/bin/xpcshell
INFO | Using at most 32 threads.
TEST-INFO | /Users/mikeconley/Projects/comm-central/objdir-tb/mozilla/_tests/xpcshell/toolkit/components/telemetry/tests/unit/test_TelemetryPing.js | running test ...
TEST-INFO | /Users/mikeconley/Projects/comm-central/objdir-tb/mozilla/_tests/xpcshell/toolkit/components/telemetry/tests/unit/test_TelemetryStopwatch.js | running test ...
TEST-INFO | /Users/mikeconley/Projects/comm-central/objdir-tb/mozilla/_tests/xpcshell/toolkit/components/telemetry/tests/unit/test_TelemetryLockCount.js | running test ...
TEST-INFO | /Users/mikeconley/Projects/comm-central/objdir-tb/mozilla/_tests/xpcshell/toolkit/components/telemetry/tests/unit/test_TelemetryLateWrites.js | running test ...
TEST-INFO | /Users/mikeconley/Projects/comm-central/objdir-tb/mozilla/_tests/xpcshell/toolkit/components/telemetry/tests/unit/test_nsITelemetry.js | running test ...
TEST-INFO | /Users/mikeconley/Projects/comm-central/objdir-tb/mozilla/_tests/xpcshell/toolkit/components/telemetry/tests/unit/test_TelemetryPing_idle.js | running test ...
TEST-INFO | Failed to remove directory: /var/folders/bq/n5qs5f650bl7kmj4h_fqsw2m0000gn/T/tmpZj9nQW. Waiting.
TEST-INFO | /Users/mikeconley/Projects/comm-central/objdir-tb/mozilla/_tests/xpcshell/toolkit/components/telemetry/tests/unit/test_ThirdPartyCookieProbe.js | running test ...
TEST-INFO | test_TelemetryLateWrites.js | Test failed or timed out, will retry.
TEST-INFO | /Users/mikeconley/Projects/comm-central/objdir-tb/mozilla/_tests/xpcshell/toolkit/components/telemetry/tests/unit/test_TelemetryPingBuildID.js | running test ...
TEST-INFO | test_TelemetryLockCount.js | Test failed or timed out, will retry.
TEST-INFO | test_TelemetryPing.js | Test failed or timed out, will retry.
TEST-INFO | test_TelemetryPingBuildID.js | Test failed or timed out, will retry.
TEST-INFO | /Users/mikeconley/Projects/comm-central/objdir-tb/mozilla/_tests/xpcshell/toolkit/components/telemetry/tests/unit/test_TelemetrySendOldPings.js | running test ...
TEST-INFO | test_TelemetryPing_idle.js | Test failed or timed out, will retry.
TEST-INFO | test_ThirdPartyCookieProbe.js | Test failed or timed out, will retry.
TEST-INFO | test_nsITelemetry.js | Test failed or timed out, will retry.
TEST-INFO | test_TelemetrySendOldPings.js | Test failed or timed out, will retry.
TEST-INFO | test_TelemetryStopwatch.js | Test failed or timed out, will retry.
Retrying tests that failed when run in parallel.
TEST-INFO | /Users/mikeconley/Projects/comm-central/objdir-tb/mozilla/_tests/xpcshell/toolkit/components/telemetry/tests/unit/test_TelemetryLockCount.js | running test ...
INFO | Following exceptions were raised:
Traceback (most recent call last):
  File "/Users/mikeconley/Projects/comm-central/mozilla/testing/xpcshell/runxpcshelltests.py", line 145, in run
    self.run_test()
  File "/Users/mikeconley/Projects/comm-central/mozilla/testing/xpcshell/runxpcshelltests.py", line 604, in run_test
    stdout=self.pStdout, stderr=self.pStderr, env=self.env, cwd=test_dir)
  File "/Users/mikeconley/Projects/comm-central/mozilla/testing/xpcshell/runxpcshelltests.py", line 224, in launchProcess
    env=env, cwd=cwd)
  File "/Users/mikeconley/Projects/comm-central/mozilla/python/psutil/psutil/__init__.py", line 855, in __init__
    self.__subproc = subprocess.Popen(*args, **kwargs)
  File "/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 711, in __init__
    errread, errwrite)
  File "/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1308, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory

Traceback (most recent call last):
  File "/Users/mikeconley/Projects/comm-central/mozilla/config/pythonpath.py", line 56, in <module>
    main(sys.argv[1:])
  File "/Users/mikeconley/Projects/comm-central/mozilla/config/pythonpath.py", line 48, in main
    execfile(script, frozenglobals)
  File "/Users/mikeconley/Projects/comm-central/mozilla/testing/xpcshell/runxpcshelltests.py", line 1594, in <module>
    main()
  File "/Users/mikeconley/Projects/comm-central/mozilla/testing/xpcshell/runxpcshelltests.py", line 1590, in main
    if not xpcsh.runTests(args[0], testdirs=args[1:], **options.__dict__):
  File "/Users/mikeconley/Projects/comm-central/mozilla/testing/xpcshell/runxpcshelltests.py", line 1475, in runTests
    raise exceptions[0]
OSError: [Errno 2] No such file or directory
make[1]: *** [xpcshell-tests] Error 1
make: *** [xpcshell-tests] Error 2
Mikes-MacBook-Pro-2:objdir-tb mikeconley$



Digging into the problem, it appears the following file in my example is missing:

/Users/mikeconley/Projects/comm-central/objdir-tb/mozilla/dist/bin/xpcshell

When I run xpcshell tests with mozilla-central builds, this file exists.

I have to conclude that the comm-central build infrastructure is not correctly putting xpcshell into dist/bin/xpcshell.

Anybody with some c-c build chops know why, and what we can do about it?
Not sure from the listing, but is objdir-tb correctly outside your source tree?
> Digging into the problem, it appears the following file in my example is
> missing:
> 
> /Users/mikeconley/Projects/comm-central/objdir-tb/mozilla/dist/bin/xpcshell
> 
> When I run xpcshell tests with mozilla-central builds, this file exists.

The file exists on my linux box.
I believe Mike has got this working now?
Flags: needinfo?(mconley)
It's true - I was able to get this working by following Magnus's advice and making sure the objdir was a sibling of the srcdir and not a child.

Thanks all!
Status: NEW → RESOLVED
Closed: 10 years ago
Flags: needinfo?(mconley)
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.