about summary refs log tree commit diff stats
path: root/tests/unittests/test_callbacks.h
Commit message (Expand)AuthorAgeFilesLines
* Apply coding styleMichael Vetter2020-07-071-2/+2
* Revert "Apply coding style"Michael Vetter2020-07-071-2/+2
* Apply coding styleMichael Vetter2020-07-071-2/+2
* Free plugins commands on quitJames Booth2016-07-041-0/+2
c3ae013a768618'>^
506418ef5 ^


45a5c64c9 ^
730ce53b7 ^

45a5c64c9 ^





730ce53b7 ^
1ab37ccfc ^
730ce53b7 ^
ab525cc48 ^
45a5c64c9 ^


3d7d06571 ^
45a5c64c9 ^




ab525cc48 ^

45a5c64c9 ^
730ce53b7 ^





1e89e5bf9 ^
506418ef5 ^
0bb76dde5 ^
e0afacb9f ^
0bb76dde5 ^
3d7d06571 ^


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

# build development version of the compiler; can be rerun safely.
# arguments can be passed, eg `--os freebsd`

set -u # error on undefined variables
set -e # exit on first error

echo_run(){
  echo "$*"
  "$@"
}

[ -d csources ] || echo_run git clone -q --depth 1 https://github.com/nim-lang/csources.git

nim_csources=bin/nim_csources

build_nim_csources_via_script(){
  echo_run cd csources
  echo_run sh build.sh "$@"
}

build_nim_csources(){
  # avoid changing dir in case of failure
  (
    if [ $# -ne 0 ]; then
      # some args were passed (eg: `--cpu i386`), need to call build.sh
      build_nim_csources_via_script "$@"
    else
      # no args, use multiple Make jobs (5X faster on 16 cores: 10s instead of 50s)
      makeX=make
      unamestr=$(uname)
      if [ "$unamestr" = 'FreeBSD' ]; then
        makeX=gmake
      fi
      nCPU=$(nproc 2>/dev/null || sysctl -n hw.logicalcpu 2>/dev/null || getconf _NPROCESSORS_ONLN 2>/dev/null || 1)
      which $makeX && echo_run $makeX -C csources -j $((nCPU + 2)) -l $nCPU || build_nim_csources_via_script
    fi
  )
  # keep $nim_csources in case needed to investigate bootstrap issues
  # without having to rebuild from csources
  echo_run cp bin/nim $nim_csources
}

[ -f $nim_csources ] || echo_run build_nim_csources $@

# Note: if fails, may need to `cd csources && git pull`
echo_run bin/nim c --skipUserCfg --skipParentCfg koch

echo_run ./koch boot -d:release --skipUserCfg --skipParentCfg
echo_run ./koch tools --skipUserCfg --skipParentCfg # Compile Nimble and other tools.