Open KLandwich opened 9 months ago
Workaround is possible and will be explained in the next comment. But functionality should be implemented in new feature request.
Feature request is #29
This is a reasonable approach. As we created the setup script we didn't have that in mind.
SASUnit currently is capable to do so, but not the setup routine. To minimze manual editing of script files you can do the following:
Here are examples of the changes you need to do: sasunit setup script file sasunit.setup.9.4.cmd:
REM --------------------------------------------------------------------------------
REM --- EnvVars for SAS Unit Configuration -----------------------------------------
SET SASUNIT_ROOT=C:\TEMP\_SASUnitTest\v2.1
SET SASUNIT_PROJECTROOT=C:\TEMP\_SASUnitTest\v2.1\example\sasunit_files
SET SASUNIT_TESTDB_PATH=%SASUNIT_PROJECTROOT%\%SASUNIT_LANGUAGE%\testdb
SET SASUNIT_LOG_PATH=%SASUNIT_PROJECTROOT%\%SASUNIT_LANGUAGE%\logs
SET SASUNIT_SCN_LOG_PATH=%SASUNIT_PROJECTROOT%\%SASUNIT_LANGUAGE%\scn_logs
SET SASUNIT_REPORT_PATH=%SASUNIT_PROJECTROOT%\%SASUNIT_LANGUAGE%\doc
SET SASUNIT_RUNALL=%SASUNIT_PROJECTROOT%\saspgm\run_all.sas
SET SASUNIT_LOG_LEVEL=INFO
SET SASUNIT_SCN_LOG_LEVEL=INFO
Update run_all.sas:
%initSASUnit(
i_root = %sysget(SASUNIT_PROJECT_ROOT)
,io_target = %sysget(SASUNIT_TEST_DB_FOLDER)
,i_overwrite = %sysget(SASUNIT_OVERWRITE)
,i_project = SASUnit Examples
,i_sasunit = %sysget(SASUNIT_ROOT)/saspgm/sasunit
,i_sasautos = C:/TEMP/_SASUnitTest/v2.1/example/saspgm
,i_testdata = %sysget(SASUNIT_PROJECT_ROOT)/dat
,i_refdata = %sysget(SASUNIT_PROJECT_ROOT)/dat
,i_doc = doc/spec
,i_sascfg = %sysget(SASUNIT_SAS_CFG)
,i_testcoverage = %sysget(SASUNIT_COVERAGEASSESSMENT)
/* Run specified test scenarios. There can be more than one call to runSASUnit */
%runSASUnit(i_source = C:/TEMP/_SASUnitTest/v2.1/example/saspgm/%str(*)_test.sas);
Update bin/sasunit.9.4.<os>.<language>.cfg:
-CONFIG "C:\Program Files\SASHome\SASFoundation\9.4\nls\en\sasv9.cfg"
-sysin C:\TEMP\_SASUnitTest\v2.1\example\saspgm\run_all.sas
-log C:\TEMP\_SASUnitTest\v2.1\example\sasunit_files\en\logs
-print C:\TEMP\_SASUnitTest\v2.1\example\sasunit_files\en\logs
This is the way to go with the least manual effort.
We will incoporate this setup into our setup scripts.
Contact Details
No response
What happened?
We have a different location for program installations and the projects with the SAS-Programms
Installation (disk d): sasunit
Project (disk f):
In sasunit.setup.9.4.cmd it is possible to set up this structure.
SET SASUNIT_TESTDB_PATH=%SASUNIT_PROJECTROOT%\sasunit_prj\%SASUNIT_LANGUAGE%\testdb SET SASUNIT_LOG_PATH=%SASUNIT_PROJECTROOT%\sasunit_prj\%SASUNIT_LANGUAGE%\logs SET SASUNIT_SCN_LOG_PATH=%SASUNIT_PROJECTROOT%\sasunit_prj\%SASUNIT_LANGUAGE%\scn_logs SET SASUNIT_REPORT_PATH=%SASUNIT_PROJECTROOT%\sasunit_prj\%SASUNIT_LANGUAGE%\doc SET SASUNIT_RUNALL=%SASUNIT_PROJECTROOT%\sasunit_prj\run_all.sas
but initsasunit.sas and runsasunitsetup.sas want the bin directory only in g_sProjectRootFolder, i_root (SASUNIT_PROJECTROOT). It is possible to change initsasunit.sas and runsasunitsetup.sas to have all the sasunit project files to have in one directory?
in this constallation some directories are not created in initsasunit.sas:
%SASUNIT_PROJECTROOT%\sasunit_prj\bin %SASUNIT_TESTDB_PATH% %SASUNIT_LOG_PATH% %SASUNIT_SCN_LOG_PATH% %SASUNIT_REPORT_PATH% %SASUNIT_PROJECTROOT%\sasunit_prj\dat %SASUNIT_PROJECTROOT%\sasunit_prj\doc\spec %SASUNIT_PROJECTROOT%\sasunit_prj\en\doc\tempDoc\crossreference
Respective ticket on SourceForge
Version
2.1 (Default)
Relevant log output
No response