ng_0.9
Last change
on this file since cbe8c6 was
cbe8c6,
checked in by rene <rene@…>, 6 years ago
|
add stdlib
|
-
Property mode set to
100755
|
File size:
1.5 KB
|
Line | |
---|
1 | #!/bin/sh |
---|
2 | # TODO: move the two lines below in some separate config file |
---|
3 | TB_OBJDIR=~/Code/objdir-comm-central/ |
---|
4 | TB_SRCDIR=~/Code/comm-central/ |
---|
5 | OLD_PWD=`pwd` |
---|
6 | PROFD=/tmp/p/ |
---|
7 | |
---|
8 | run_all() { |
---|
9 | # Remove startup cache (MOZ_PURGE_CACHES seems to have no effect) to make sure |
---|
10 | # xpcshell is not caching the module we're testing. Actually, blow away the |
---|
11 | # whole profile. |
---|
12 | rm -rf $PROFD |
---|
13 | # Create a fake profile directory |
---|
14 | mkdir -p $PROFD |
---|
15 | # head.js will check this variable to figure out where our fake profile |
---|
16 | # directory should point to |
---|
17 | export XPCSHELL_TEST_PROFILE_DIR=$PROFD |
---|
18 | # Should help |
---|
19 | export MOZ_REPORT_ALL_JS_EXCEPTIONS=1 |
---|
20 | # Make it available in the modules/ directory xpcshell will "see" |
---|
21 | \cp ../SimpleStorage.js $TB_OBJDIR/mozilla/dist/bin/modules/ |
---|
22 | # Fake a directory structure similar to that of conversations so that the |
---|
23 | # modules SimpleStorage depends on are available |
---|
24 | mkdir -p $TB_OBJDIR/mozilla/dist/bin/conversations/ |
---|
25 | \cp ../../log.js $TB_OBJDIR/mozilla/dist/bin/conversations/ |
---|
26 | # Jump to the aforementioned objdir |
---|
27 | cd $TB_OBJDIR/mozilla/dist/bin/ |
---|
28 | # resource://conversations becomes resources:///conversations |
---|
29 | sed -i 's/resource:\/\/conversations/resource:\/\/\/conversations/' $TB_OBJDIR/mozilla/dist/bin/modules/SimpleStorage.js |
---|
30 | # here we go, and don't forget that the line number in errors will be |
---|
31 | # augmented with the line count from head.js |
---|
32 | ./xpcshell -f $TB_SRCDIR/mozilla/testing/xpcshell/head.js $OLD_PWD/test_SimpleStorage.js |
---|
33 | } |
---|
34 | |
---|
35 | run_all |
---|
Note: See
TracBrowser
for help on using the repository browser.