Files
dc/sas/sasjs/tests/testinit.sas
T
hermes 82a45b80b4
Build / Build-and-ng-test (pull_request) Successful in 5m20s
Lighthouse Checks / lighthouse (pull_request) Successful in 21m59s
Build / Build-and-test-development (pull_request) Successful in 24m27s
chore(viya): run tests on the reusable compute context, harden chunk deploy
The test jobs on the nextviya estate run as a batch identity that is
not authorised to create sessions in the SAS Job Execution compute
context - child service submissions via mx_execute all failed with
403.  Default the test context to Compute Reusable (matching the
target contextName) in the shared test init programs.

Also give the chunk deploy helper a retry loop for the per-chunk
sasjs run timeouts - estate cold-starts can exceed a single 300s
window.
2026-09-08 20:52:19 +01:00

68 lines
1.4 KiB
SAS

/**
@file
@brief testinit.sas
<h4> SAS Macros </h4>
@li dc_getsettings.sas
@li mf_getplatform.sas
@li mpeinit2.sas
@li mp_abort.sas
@li mp_init.sas
**/
%mp_init()
%let syscc=0;
%global apploc _program dclib defaultcontext _debug sasjs_mdebug dc_dttmtfmt;
%let defaultcontext=Compute Reusable;
%let sasjs_mdebug=0;
options mprint mprintnest nobomfile lrecl=32767;
%mpeinit2()
data _null_;
length _pgm $1000;
_pgm=symget('_program');
if _pgm='' then do;
if "&SYSPROCESSMODE" = 'SAS Workspace Server'
then apploc=
'/30.SASApps/3030.Projects/303001.DataController/build2/DataController';
else apploc='/Public/app/viya';
call symputx('apploc',apploc);
call symputx('_program',cats(apploc,'/tests/services/bottom'));
end;
else do;
cnt=find(_pgm,'/tests/');
if cnt=0 then cnt=find(_pgm,'/services/');
if cnt=0 then cnt=find(_pgm,'/jobs/');
apploc=substr(_pgm,1,cnt-1);
put cnt= apploc= _pgm=;
call symputx('apploc',apploc);
end;
run;
%macro conditional();
%if %scan(&_program,-1,/) ne testsetup %then %do;
%dc_getsettings()
/* this should be tidied up */
%global dclib mpelib dc_libref;
%let dclib=&dc_libref;
%let mpelib=&dc_libref;
%put &=dclib &=mpelib;
%end;
%if "&_debug"="2477" or "&_debug"="fields,log,trace" or "&_debug"="131"
%then %do;
%let sasjs_mdebug=1;
%end;
%mend conditional;
%conditional()