-
Notifications
You must be signed in to change notification settings - Fork 4.3k
/
runModuleAlloc.sh
executable file
·52 lines (30 loc) · 2.9 KB
/
runModuleAlloc.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#!/bin/sh -ex
function die { echo $1: status $2 ; exit $2; }
LOCAL_TEST_DIR=${SCRAM_TEST_PATH}
LD_PRELOAD="libPerfToolsAllocMonitorPreload.so" cmsRun ${LOCAL_TEST_DIR}/moduleAlloc_cfg.py || die 'Failure using moduleAlloc_cfg.py' $?
grep '^[fF]' moduleAlloc.log | awk '{print $1,$2,$3,$4,$5,$6}' > allTransitions.log
diff allTransitions.log ${LOCAL_TEST_DIR}/unittest_output/allTransitions.log || die 'differences in allTransitions' $?
grep '^[mM]' moduleAlloc.log | awk '{print $1,$2,$3,$4,$5}' > allEDModules.log
diff allEDModules.log ${LOCAL_TEST_DIR}/unittest_output/allEDModules.log || die 'differences in allEDModules' $?
grep '^[nN]' moduleAlloc.log | awk '{print $1,$2,$3,$4,$5,$6}' > allESModules.log
diff allESModules.log ${LOCAL_TEST_DIR}/unittest_output/allESModules.log || die 'differences in allESModules' $?
############### only 1 ED module kept
LD_PRELOAD="libPerfToolsAllocMonitorPreload.so" cmsRun ${LOCAL_TEST_DIR}/moduleAlloc_cfg.py --edmodule || die 'Failure using moduleAlloc_cfg.py --edmodule' $?
grep '^[mM]' moduleAlloc.log | awk '{print $1,$2,$3,$4,$5}' > only_ed_EDModules.log
diff only_ed_EDModules.log ${LOCAL_TEST_DIR}/unittest_output/only_ed_EDModules.log || die 'differences in only_ed_EDModules' $?
grep '^[nN]' moduleAlloc.log | awk '{print $1,$2,$3,$4,$5,$6}' > only_ed_ESModules.log
diff only_ed_ESModules.log ${LOCAL_TEST_DIR}/unittest_output/only_ed_ESModules.log || die 'differences in only_ed_ESModules' $?
############### only 1 ES module kept
LD_PRELOAD="libPerfToolsAllocMonitorPreload.so" cmsRun ${LOCAL_TEST_DIR}/moduleAlloc_cfg.py --esmodule || die 'Failure using moduleAlloc_cfg.py --esmodule' $?
grep '^[mM]' moduleAlloc.log | awk '{print $1,$2,$3,$4,$5}' > only_es_EDModules.log
diff only_es_EDModules.log ${LOCAL_TEST_DIR}/unittest_output/only_es_EDModules.log || die 'differences in only_es_EDModules' $?
grep '^[nN]' moduleAlloc.log | awk '{print $1,$2,$3,$4,$5,$6}' > only_es_ESModules.log
diff only_es_ESModules.log ${LOCAL_TEST_DIR}/unittest_output/only_es_ESModules.log || die 'differences in only_es_ESModules' $?
############## skip events
LD_PRELOAD="libPerfToolsAllocMonitorPreload.so" cmsRun ${LOCAL_TEST_DIR}/moduleAlloc_cfg.py --skipEvents || die 'Failure using moduleAlloc_cfg.py --skipEvents' $?
grep '^[fF]' moduleAlloc.log | awk '{print $1,$2,$3,$4,$5,$6}' > skipEvents_Transitions.log
diff skipEvents_Transitions.log ${LOCAL_TEST_DIR}/unittest_output/skipEvents_Transitions.log || die 'differences in skipEvents_Transitions' $?
grep '^[mM]' moduleAlloc.log | awk '{print $1,$2,$3,$4,$5}' > skipEvents_EDModules.log
diff skipEvents_EDModules.log ${LOCAL_TEST_DIR}/unittest_output/skipEvents_EDModules.log || die 'differences in skipEvents_EDModules' $?
grep '^[nN]' moduleAlloc.log | awk '{print $1,$2,$3,$4,$5,$6}' > skipEvents_ESModules.log
diff skipEvents_ESModules.log ${LOCAL_TEST_DIR}/unittest_output/skipEvents_ESModules.log || die 'differences in skipEvents_ESModules' $?