File tree Expand file tree Collapse file tree 2 files changed +23
-1
lines changed
Expand file tree Collapse file tree 2 files changed +23
-1
lines changed Original file line number Diff line number Diff line change 11import os
22import v.gen.native
33import v.pref
4+ import log
45
56fn test_macho () {
6- os.chdir (os.temp_dir ()) or {}
7+ log.info ('start' )
8+ os.chdir (os.vtmp_dir ()) or {}
9+ log.info ('chdir' )
710 mut g := native.macho_test_new_gen (& pref.Preferences{
811 arch: .amd64
912 }, 'test.bin' )
13+ log.info ('native.macho_test_new_gen' )
1014 g.generate_macho_header ()
15+ log.info ('g.generate_macho_header' )
1116 g.generate_macho_footer ()
17+ log.info ('g.generate_macho_footer' )
1218}
Original file line number Diff line number Diff line change 11// vtest build: (amd64 || arm64) && !self_sandboxed_packaging? && !gcc-windows
2+ @[has_globals]
3+ module main
4+
25import os
36import time
47import benchmark
58import term
9+ import log
10+ import os.filelock
611
712const is_verbose = os.getenv ('VTEST_SHOW_CMD' ) != ''
813const user_os = os.user_os ()
914const wrkdir = os.join_path (os.vtmp_dir (), 'native_tests' )
1015
16+ const flock_path = os.join_path (os.vtmp_dir (), 'native_tests.lock' )
17+
18+ __global flock_singleton = filelock.new (flock_path)
19+
1120fn testsuite_begin () {
21+ log.info (@FN)
22+ if ! flock_singleton.try_acquire () {
23+ log.info ('>>>> skipping ${@FILE} , since it has been already started and ${flock_path} is present...' )
24+ exit (0 )
25+ }
1226 os.mkdir_all (wrkdir) or {}
1327 os.chdir (wrkdir) or {}
1428}
1529
1630fn testsuite_end () {
1731 os.rmdir_all (wrkdir) or {}
32+ flock_singleton.release ()
33+ log.info (@FN)
1834}
1935
2036// TODO: some logic copy pasted from valgrind_test.v and compiler_test.v, move to a module
You can’t perform that action at this time.
0 commit comments