Permalink
Browse files

SERVER-4994: load() is relative to the checkout root

this also means we don't have to muddle about with TestData.testPath,
which was shaky on windows anyway due to path separators
  • Loading branch information...
1 parent b413701 commit 507904583ca81a7e9a8bb369923d80f5beb7c29b Dan Crosta committed Mar 1, 2012
Showing with 7 additions and 28 deletions.
  1. +2 −13 jstests/aggregation/testall.js
  2. +5 −15 jstests/aggregation/testbugs.js
@@ -2,22 +2,11 @@
Run all the aggregation tests
*/
-// TestData is set by the smoketest framework; if it is not defined,
-// then loaded files are assumed to be in in the current directory
-if (typeof TestData !== "undefined" && typeof TestData.testPath !== "undefined") {
- var mydir = TestData.testPath.substr(0, TestData.testPath.lastIndexOf("/"))
- if (mydir[mydir.length - 1] !== '/') {
- mydir += '/';
- }
-} else {
- var mydir = '';
-}
-
/* load the test documents */
-load(mydir + 'articles.js');
+load('jstests/aggregation/articles.js');
/* load the test utilities */
-load(mydir + 'utils.js');
+load('jstests/aggregation/utils.js');
// make sure we're using the right db; this is the same as "use mydb;" in shell
db = db.getSiblingDB("aggdb");
@@ -1,20 +1,10 @@
-// TestData is set by the smoketest framework; if it is not defined,
-// then loaded files are assumed to be in in the current directory
-if (typeof TestData !== "undefined" && typeof TestData.testPath !== "undefined") {
- var mydir = TestData.testPath.substr(0, TestData.testPath.lastIndexOf("/"))
- if (mydir[mydir.length - 1] !== '/') {
- mydir += '/';
- }
-} else {
- var mydir = '';
-}
// load utils
-load(mydir + 'utils.js');
+load('jstests/aggregation/utils.js');
// test all the bug test cases
-load(mydir + 'server3832.js');
-load(mydir + 'server4508.js');
+load('jstests/aggregation/server3832.js');
+load('jstests/aggregation/server4508.js');
//load('server4638.js');
-load(mydir + 'server4738.js');
-load(mydir + 'server5012.js');
+load('jstests/aggregation/server4738.js');
+load('jstests/aggregation/server5012.js');

0 comments on commit 5079045

Please sign in to comment.