File tree Expand file tree Collapse file tree 4 files changed +50
-0
lines changed
Utilities/ReleaseScripts/test Expand file tree Collapse file tree 4 files changed +50
-0
lines changed Original file line number Diff line number Diff line change 11<test name =" TestSCRAM" command =" run.sh" />
22<test name =" SCRAM_TestPass" command =" true" />
33<test name =" SCRAM_TestFail" command =" ! false" />
4+ <test name =" test-gdb-python" command =" gdb/test-gdb-python.sh" >
5+ <use name =" gdb" />
6+ </test >
7+ <test name =" test-cmsTraceFunction-setenv" command =" gdb/test-cmsTraceFunction-setenv.sh" >
8+ <use name =" gdb" />
9+ </test >
410<test name =" test-clang-tidy" command =" test-clang-tidy.sh" >
511 <use name =" llvm" />
612</test >
Original file line number Diff line number Diff line change 1+ #include < iostream>
2+ #include < cstdlib>
3+ #include < stdlib.h>
4+
5+ class ScheduleItems {
6+ public:
7+ ScheduleItems () {}
8+ void initMisc ();
9+ };
10+
11+ void ScheduleItems::initMisc () { std::cout << " ScheduleItems::initMisc() called" << std::endl; }
12+
13+ void my_setenv (const char * env, const char * value) {
14+ setenv (env, value, 1 );
15+ std::cout << " setenv() called" << std::endl;
16+ std::cout << env << " =" << std::getenv (env) << std::endl;
17+ }
18+
19+ int main () {
20+ my_setenv (" FOO" , " 1" );
21+ ScheduleItems obj;
22+ obj.initMisc ();
23+ my_setenv (" FOO" , " 2" );
24+ my_setenv (" FOO" , " 3" );
25+ return 0 ;
26+ }
Original file line number Diff line number Diff line change 1+ #! /bin/bash -ex
2+ g++ -o test-cmsTraceFunction-setenv $( dirname $0 ) /test-cmsTraceFunction-setenv.cpp
3+ cmsTraceFunction --startAfterFunction ScheduleItems::initMisc setenv ./test-cmsTraceFunction-setenv 2>&1 | grep setenv > setenv.log
4+ rm -f test-cmsTraceFunction-setenv
5+ setenv_count=$( grep ' ^setenv() called' setenv.log | wc -l)
6+ break_setenv=$( grep ' Breakpoint .* in setenv ()' setenv.log | wc -l)
7+ if [ ${setenv_count} != 3 ] || [ ${break_setenv} != 2 ] ; then
8+ exit 1
9+ fi
Original file line number Diff line number Diff line change 1+ #! /bin/bash -ex
2+ gdb_python=$( gdb -q -ex ' python exec("import sys;print(sys.executable)")' -ex quit)
3+ cmssw_python=$( scram tool tag python3 PYTHON3_BASE) /bin/python
4+ if [ " ${gdb_python} " != " ${cmssw_python} " ] ; then
5+ echo " python used by GDB and CMSSW are not same"
6+ exit 1
7+ else
8+ echo " CMSSW/GDB python OK"
9+ fi
You can’t perform that action at this time.
0 commit comments