Coverage for pyquickhelper/pycode/linux_scripts.py: 100%

7 statements  

« prev     ^ index     » next       coverage.py v7.2.7, created at 2023-06-03 02:21 +0200

1""" 

2@brief 

3@file Batch file use to automate some of the tasks (setup, unit tests, help, pypi). 

4""" 

5import sys 

6 

7 

8def _sversion(): 

9 return "PY%d%d" % sys.version_info[:2] 

10 

11################# 

12#: stop if error 

13################# 

14 

15 

16linux_error = "if [ $? -ne 0 ]; then exit $?; fi" 

17 

18################# 

19#: call the setup 

20################# 

21jenkins_linux_setup = "$PYINT -u setup.py" 

22 

23 

24################# 

25#: script for Jenkins 

26################# 

27linux_jenkins = "echo SCRIPT: linux_jenkins\nexport jenkinspython=__PYTHON__\necho ~EXPORT jenkinspython=__PYTHON__\n" + \ 

28 "\n__PACTHPQb__\n" + \ 

29 jenkins_linux_setup + " build_script\n" + \ 

30 "\n__PACTHPQe__\n" + \ 

31 linux_error + "\nbash auto_unittest_setup_help.sh $jenkinspython __SUFFIX__\n" + \ 

32 linux_error 

33 

34linux_jenkins_any = "echo SCRIPT: linux_jenkins_any\nexport jenkinspython=__PYTHON__\necho ~EXPORT jenkinspython=__PYTHON__\n" + \ 

35 "\n__PACTHPQb__\n" + \ 

36 jenkins_linux_setup + " build_script\n" + \ 

37 "\n__PACTHPQe__\n" + \ 

38 linux_error + "\nbash auto_cmd_any_setup_command.sh $jenkinspython __SUFFIX__ __COMMAND__\n" + \ 

39 linux_error