Skip to content

Commit 25bde13

Browse files
author
Vasileios Karakasis
authored
Merge branch 'master' into doc/literal_include_tagged
2 parents 31fcb3d + c1cc49b commit 25bde13

File tree

2 files changed

+15
-24
lines changed

2 files changed

+15
-24
lines changed

README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,7 @@ You can optionally run the framework's unit tests with the following command:
4949
./test_reframe.py -v
5050
```
5151

52-
NOTE: Unit tests require a functional C compiler, available through the `cc` command, that is also able to recognize the ``-O2`` option.
53-
The [GNU Make](https://www.gnu.org/software/make/) build tool is also needed.
54-
52+
NOTE: Unit tests require a POSIX-compliant C compiler (available through the `cc` command), as well as the `make` utility.
5553

5654
### Building the documentation locally
5755

cscs-checks/prgenv/helloworld.py

Lines changed: 14 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
#
44
# SPDX-License-Identifier: BSD-3-Clause
55

6-
from datetime import datetime
7-
86
import re
97
import reframe as rfm
108
import reframe.utility.sanity as sn
@@ -16,12 +14,22 @@ class HelloWorldBaseTest(rfm.RegressionTest):
1614
prgenv_flags = {}
1715
sourcepath = 'hello_world'
1816
build_system = 'SingleSource'
17+
prebuild_cmds = ['_rfm_build_time="$(date +%s%N)"']
18+
postbuild_cmds = [
19+
'_rfm_build_time="$(($(date +%s%N)-_rfm_build_time))"',
20+
'echo "Compilations time (ns): $_rfm_build_time"'
21+
]
1922
valid_systems = ['daint:gpu', 'daint:mc', 'dom:gpu', 'dom:mc',
2023
'arolla:cn', 'arolla:pn', 'tsa:cn', 'tsa:pn']
2124
valid_prog_environs = ['PrgEnv-aocc', 'PrgEnv-cray',
2225
'PrgEnv-cray_classic', 'PrgEnv-gnu',
2326
'PrgEnv-intel', 'PrgEnv-pgi',
2427
'PrgEnv-gnu-nocuda', 'PrgEnv-pgi-nocuda']
28+
reference = {
29+
'*': {
30+
'compilation_time': (60, None, 0.1, 's')
31+
}
32+
}
2533
exclusive_access = True
2634
maintainers = ['VH', 'EK']
2735
tags = {'production', 'craype'}
@@ -93,25 +101,10 @@ def num_ranks(match):
93101
)
94102
)
95103

96-
@run_before('performance')
97-
def capture_build_time(self):
98-
self.perf_patterns = {
99-
'compilation_time': sn.getattr(self, 'compilation_time_seconds')
100-
}
101-
self.reference = {
102-
'*': {
103-
'compilation_time': (60, None, 0.1, 's')
104-
}
105-
}
106-
107-
@run_before('compile')
108-
def compile_timer_start(self):
109-
self.compilation_time_seconds = datetime.now()
110-
111-
@run_after('compile')
112-
def compile_timer_end(self):
113-
elapsed = datetime.now() - self.compilation_time_seconds
114-
self.compilation_time_seconds = elapsed.total_seconds()
104+
@performance_function('s')
105+
def compilation_time(self):
106+
return sn.extractsingle(r'Compilations time \(ns\): (\d+)',
107+
self.build_stdout, 1, float) * 1.0e-9
115108

116109

117110
@rfm.simple_test

0 commit comments

Comments
 (0)