fix(tests): read the work location from _SASJS_WORK
@sasjs/core 6.0.0 renamed the session globals to a _SASJS_ prefix and sets _SASJS_WORK only; SASJSWORK no longer exists (and sasjs/server's pre-program compat aliases never covered it). testsetup.sas still read &sasjswork in both the SASJS and SASMETA arms of %update_settings, so under the new pin those filename statements built unrooted paths and ms_createfile / mm_createstp wrote outside the session work directory, breaking sasjs test setup on SASJS and SAS9. mp_init() is called at the top of the script, so _SASJS_WORK is defined here.
This commit is contained in:
1 parent
ac97252b02
commit
033ffd3025
1 file changed
+5
-5
@@ -192,7 +192,7 @@ options mprint;
|
||||
%else %if &pf=SASJS %then %do;
|
||||
%mx_getcode(&root/services/public/settings,outref=stngs)
|
||||
|
||||
filename sendback "&sasjswork/settings2.txt" lrecl=1000;
|
||||
filename sendback "&_SASJS_WORK/settings2.txt" lrecl=1000;
|
||||
data _null_;
|
||||
file sendback;
|
||||
infile stngs end=last lrecl=1000;
|
||||
@@ -223,11 +223,11 @@ options mprint;
|
||||
|
||||
%mm_getstpcode(tree=&root/services/public
|
||||
,name=Data_Controller_Settings
|
||||
,outloc=&sasjswork/settings.txt
|
||||
,outloc=&_SASJS_WORK/settings.txt
|
||||
)
|
||||
data _null_;
|
||||
file "&sasjswork/settings2.txt";
|
||||
infile "&sasjswork/settings.txt" end=last;
|
||||
file "&_SASJS_WORK/settings2.txt";
|
||||
infile "&_SASJS_WORK/settings.txt" end=last;
|
||||
input;
|
||||
put _infile_;
|
||||
if last then do;
|
||||
@@ -238,7 +238,7 @@ options mprint;
|
||||
%mm_deletestp(target=&root/services/public/Data_Controller_Settings)
|
||||
%mm_createstp(stpname=Data_Controller_Settings
|
||||
,filename=settings2.txt
|
||||
,directory=&sasjswork
|
||||
,directory=&_SASJS_WORK
|
||||
,tree=&root/services/public
|
||||
,Server=SASApp
|
||||
,stptype=2
|
||||
|
||||
Reference in new issue
Block a user