I think this fixes tests, and makes them runnable from continuous integration.
git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@3161 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
@ -4,4 +4,4 @@ cat > test.js << EOF
|
||||
print("hi");
|
||||
EOF
|
||||
|
||||
$SANDBOXOS test.js
|
||||
$TILDEFRIENDS test.js
|
||||
|
@ -4,4 +4,4 @@ cat > test.js << EOF
|
||||
print("hi");
|
||||
EOF
|
||||
|
||||
valgrind --log-file=$LOGDIR/valgrind.log $SANDBOXOS test.js
|
||||
valgrind --log-file=$LOGDIR/valgrind.log $TILDEFRIENDS test.js
|
||||
|
@ -16,4 +16,4 @@ print("I am the child process.");
|
||||
exit(0);
|
||||
EOF
|
||||
|
||||
$SANDBOXOS test.js
|
||||
$TILDEFRIENDS test.js
|
||||
|
@ -24,4 +24,4 @@ exports = {
|
||||
}
|
||||
EOF
|
||||
|
||||
$SANDBOXOS test.js
|
||||
$TILDEFRIENDS test.js
|
||||
|
@ -23,4 +23,4 @@ exports = {
|
||||
}
|
||||
EOF
|
||||
|
||||
$SANDBOXOS test.js
|
||||
$TILDEFRIENDS test.js
|
||||
|
@ -1,80 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
mkdir -p packages
|
||||
for i in filesystem packager; do
|
||||
ln -s $ROOT/packages/$i packages/$i
|
||||
done
|
||||
cp -R $ROOT/packages/system packages/system
|
||||
|
||||
mkdir -p packages/test
|
||||
|
||||
cat > packages/test/test.js << EOF
|
||||
print("Hello!");
|
||||
|
||||
File.writeFile("packages/hello/hello.js", "this will fail to run!$^!U#%^#$%#%");
|
||||
|
||||
var p = imports.system.restartTask("hello");
|
||||
print("here is our promise: " + p.toString());
|
||||
print(p);
|
||||
|
||||
p.then(function(r) {
|
||||
print("restart succeeded when it should not have: " + r);
|
||||
imports.system.finishTest(1);
|
||||
}).catch(function(e) {
|
||||
print("restart failed: " + e);
|
||||
print(e.toString());
|
||||
for (var i in e) {
|
||||
print(i);
|
||||
print(e[i]);
|
||||
}
|
||||
imports.system.finishTest(0);
|
||||
});
|
||||
EOF
|
||||
|
||||
cat > packages/test/package.json << EOF
|
||||
{
|
||||
"name": "test",
|
||||
"start": "test.js",
|
||||
"trusted": true,
|
||||
"imports": ["packager", "system"]
|
||||
}
|
||||
EOF
|
||||
|
||||
cat >> packages/system/system.js << EOF
|
||||
exports.finishTest = function(result) {
|
||||
exit(result);
|
||||
}
|
||||
EOF
|
||||
|
||||
mkdir -p packages/hello
|
||||
|
||||
cat > packages/hello/hello.js << EOF
|
||||
print("Hi.");
|
||||
EOF
|
||||
|
||||
cat > packages/hello/package.json << EOF
|
||||
{
|
||||
"name": "hello",
|
||||
"start": "hello.js"
|
||||
}
|
||||
EOF
|
||||
|
||||
|
||||
mkdir -p packages/auth
|
||||
|
||||
cat > packages/auth/auth.js << EOF
|
||||
exports = {
|
||||
query: function() { return null; },
|
||||
getCredentials: function() { return {user: 'test', token: 'token'}; },
|
||||
verifyCredentials: function() { return {permissions: []}; },
|
||||
};
|
||||
EOF
|
||||
|
||||
cat > packages/auth/package.json << EOF
|
||||
{
|
||||
"name": "auth",
|
||||
"start": "auth.js"
|
||||
}
|
||||
EOF
|
||||
|
||||
$SANDBOXOS packages/system/system.js
|
@ -26,4 +26,4 @@ exports = {
|
||||
}
|
||||
EOF
|
||||
|
||||
$SANDBOXOS test.js
|
||||
$TILDEFRIENDS test.js
|
||||
|
@ -31,4 +31,4 @@ if (expected.length) {
|
||||
}
|
||||
EOF
|
||||
|
||||
$SANDBOXOS test.js
|
||||
$TILDEFRIENDS test.js
|
||||
|
@ -6,4 +6,4 @@ task.activate.bind(null).apply();
|
||||
exit(0);
|
||||
EOF
|
||||
|
||||
$SANDBOXOS test.js
|
||||
$TILDEFRIENDS test.js
|
||||
|
Reference in New Issue
Block a user