mirror of
https://github.com/sasjs/core.git
synced 2026-01-14 03:50:06 +00:00
Merge pull request #162 from sasjs/mf_getapploc
fix: adding support for testsetup and testteardown in mf_getapploc.sas
This commit is contained in:
9
all.sas
9
all.sas
@@ -352,6 +352,7 @@ https://github.com/yabwon/SAS_PACKAGES/blob/main/packages/baseplus.md#functionex
|
|||||||
@li /data
|
@li /data
|
||||||
@li /jobs
|
@li /jobs
|
||||||
@li /services
|
@li /services
|
||||||
|
@li /tests
|
||||||
@li /tests/jobs
|
@li /tests/jobs
|
||||||
@li /tests/services
|
@li /tests/services
|
||||||
@li /tests/macros
|
@li /tests/macros
|
||||||
@@ -383,9 +384,13 @@ https://github.com/yabwon/SAS_PACKAGES/blob/main/packages/baseplus.md#functionex
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* First check we are not in the tests/macros folder (which has no subfolders)
|
* First check we are not in the tests/macros folder (which has no subfolders)
|
||||||
|
* or specifically in the testsetup or testteardown services
|
||||||
*/
|
*/
|
||||||
%if %index(&pgm,/tests/macros/) %then %do;
|
%if %index(&pgm,/tests/macros/)
|
||||||
%let root=%substr(&pgm,1,%index(&pgm,/tests/macros)-1);
|
or %index(&pgm,/tests/testsetup)
|
||||||
|
or %index(&pgm,/tests/testteardown)
|
||||||
|
%then %do;
|
||||||
|
%let root=%substr(&pgm,1,%index(&pgm,/tests)-1);
|
||||||
&root
|
&root
|
||||||
%return;
|
%return;
|
||||||
%end;
|
%end;
|
||||||
|
|||||||
@@ -15,6 +15,7 @@
|
|||||||
@li /data
|
@li /data
|
||||||
@li /jobs
|
@li /jobs
|
||||||
@li /services
|
@li /services
|
||||||
|
@li /tests
|
||||||
@li /tests/jobs
|
@li /tests/jobs
|
||||||
@li /tests/services
|
@li /tests/services
|
||||||
@li /tests/macros
|
@li /tests/macros
|
||||||
@@ -46,9 +47,13 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* First check we are not in the tests/macros folder (which has no subfolders)
|
* First check we are not in the tests/macros folder (which has no subfolders)
|
||||||
|
* or specifically in the testsetup or testteardown services
|
||||||
*/
|
*/
|
||||||
%if %index(&pgm,/tests/macros/) %then %do;
|
%if %index(&pgm,/tests/macros/)
|
||||||
%let root=%substr(&pgm,1,%index(&pgm,/tests/macros)-1);
|
or %index(&pgm,/tests/testsetup)
|
||||||
|
or %index(&pgm,/tests/testteardown)
|
||||||
|
%then %do;
|
||||||
|
%let root=%substr(&pgm,1,%index(&pgm,/tests)-1);
|
||||||
&root
|
&root
|
||||||
%return;
|
%return;
|
||||||
%end;
|
%end;
|
||||||
|
|||||||
15
package-lock.json
generated
15
package-lock.json
generated
@@ -7,7 +7,8 @@
|
|||||||
"name": "@sasjs/core",
|
"name": "@sasjs/core",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@sasjs/cli": "3.6.0"
|
"@sasjs/cli": "3.6.0",
|
||||||
|
"@sasjs/core": "4.4.4"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@sasjs/adapter": {
|
"node_modules/@sasjs/adapter": {
|
||||||
@@ -108,6 +109,12 @@
|
|||||||
"valid-url": "^1.0.9"
|
"valid-url": "^1.0.9"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/@sasjs/core": {
|
||||||
|
"version": "4.4.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/@sasjs/core/-/core-4.4.4.tgz",
|
||||||
|
"integrity": "sha512-gN6d0fvhaofp7buemS5KIOo5Bz8lbqhsEQD7SuH5FZ02MQurmfu7A0Zg0lIEi0w2/ptI4M/sZdF4D2DRh1D5xA==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"node_modules/@sasjs/lint": {
|
"node_modules/@sasjs/lint": {
|
||||||
"version": "1.11.2",
|
"version": "1.11.2",
|
||||||
"resolved": "https://registry.npmjs.org/@sasjs/lint/-/lint-1.11.2.tgz",
|
"resolved": "https://registry.npmjs.org/@sasjs/lint/-/lint-1.11.2.tgz",
|
||||||
@@ -2822,6 +2829,12 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"@sasjs/core": {
|
||||||
|
"version": "4.4.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/@sasjs/core/-/core-4.4.4.tgz",
|
||||||
|
"integrity": "sha512-gN6d0fvhaofp7buemS5KIOo5Bz8lbqhsEQD7SuH5FZ02MQurmfu7A0Zg0lIEi0w2/ptI4M/sZdF4D2DRh1D5xA==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"@sasjs/lint": {
|
"@sasjs/lint": {
|
||||||
"version": "1.11.2",
|
"version": "1.11.2",
|
||||||
"resolved": "https://registry.npmjs.org/@sasjs/lint/-/lint-1.11.2.tgz",
|
"resolved": "https://registry.npmjs.org/@sasjs/lint/-/lint-1.11.2.tgz",
|
||||||
|
|||||||
@@ -33,6 +33,7 @@
|
|||||||
"prepare": "git rev-parse --git-dir && git config core.hooksPath ./.git-hooks || true"
|
"prepare": "git rev-parse --git-dir && git config core.hooksPath ./.git-hooks || true"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@sasjs/cli": "3.6.0"
|
"@sasjs/cli": "3.6.0",
|
||||||
|
"@sasjs/core": "4.4.4"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -47,3 +47,19 @@
|
|||||||
desc=Checking tests/macros appLoc matches (which has no subfolder),
|
desc=Checking tests/macros appLoc matches (which has no subfolder),
|
||||||
outds=work.test_results
|
outds=work.test_results
|
||||||
)
|
)
|
||||||
|
|
||||||
|
%mp_assert(
|
||||||
|
iftrue=(
|
||||||
|
"%mf_getapploc(/some/area/tests/testsetup)"="/some/area"
|
||||||
|
),
|
||||||
|
desc=Checking tests/testsetup operation,
|
||||||
|
outds=work.test_results
|
||||||
|
)
|
||||||
|
|
||||||
|
%mp_assert(
|
||||||
|
iftrue=(
|
||||||
|
"%mf_getapploc(/some/area/tests/testteardown)"="/some/area"
|
||||||
|
),
|
||||||
|
desc=Checking tests/teardown operation,
|
||||||
|
outds=work.test_results
|
||||||
|
)
|
||||||
@@ -76,3 +76,6 @@ run;
|
|||||||
iftrue=(&syscc ne 0),
|
iftrue=(&syscc ne 0),
|
||||||
desc=Check that non zero return code is returned if called job fails
|
desc=Check that non zero return code is returned if called job fails
|
||||||
)
|
)
|
||||||
|
|
||||||
|
/* set syscc to zero for final check in testterm */
|
||||||
|
%let syscc=0;
|
||||||
Reference in New Issue
Block a user