script for running NSPR test can check for proper environment on execution

NEW
Assigned to

Status

NSPR
NSPR
10 years ago
10 years ago

People

(Reporter: Ray Kiddy, Assigned: Wan-Teh Chang)

Tracking

4.6.8
x86
Mac OS X

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

10 years ago
Created attachment 298387 [details] [diff] [review]
a patch for the test script to check the env on Mac OS X

As Wan-Teh Chang pointed out to me in an e-mail, the NSPR tests will not run properly unless they are run via the runtests.sh command and, on Mac OS X, the proper environment variable needs to be set.

I have changes I would suggest for the runtests.sh script so that people do not have to remember these details themselves. The script can check, on Mac OS X, that the environment variable is properly set. Computers can remember details like this better than people can remember.

I know, by the way, that I am assuming that the variable is set to a single directory. Is this a problem? It would probably be more correct for the first test to check the environment and that first executable would point out the error. Would you prefer that approach?

Also, can the test scripts be put somewhere in the build product? This is how it is done in most other Mozilla projects.
Attachment #298387 - Flags: review?(wtc)
(Assignee)

Comment 1

10 years ago
Comment on attachment 298387 [details] [diff] [review]
a patch for the test script to check the env on Mac OS X

Ray, thanks for the patch.

It is better to test for libnspr4.dylib instead.
You should also allow libnspr4.dylib in the directory
where the test programs are.  That's how I run the
tests -- I copy the *.dylib files to the directory
where the test programs reside.

Remove "relative" from the error message.
Attachment #298387 - Flags: review?(wtc) → review+
(Assignee)

Comment 2

10 years ago
Another approach is to just copy ../../dist/lib/*.dylib
to the current directory for the user.  We can also use
symlinks.
You need to log in before you can comment on or make changes to this bug.