Skip to content

Commit d49910b

Browse files
authored
Merge pull request #824 from mnordsletten/dev
Improved use of INCLUDEOS_SRC in scripts
2 parents 96839d6 + 591df93 commit d49910b

34 files changed

Lines changed: 116 additions & 30 deletions

File tree

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ IncludeOS is free software, with "no warranties or restrictions of any kind".
1818

1919
## Build status
2020

21-
| | Build from bundle | Build from source |
22-
|--------|---------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------|
23-
| Master | [![Build Status](https://jenkins.includeos.org/buildStatus/icon?job=shield_master_bundle)](https://jenkins.includeos.org/job/shield_master_bundle/) | Coming soon |
24-
| Dev | [![Build Status](https://jenkins.includeos.org/buildStatus/icon?job=shield_dev_bundle)](https://jenkins.includeos.org/job/shield_dev_bundle/) | Coming soon |
21+
| | Build from bundle |
22+
|--------|---------------------------------------------------------------------------------------------------------------------------------------------------------------|
23+
| Master | [![Build Status](https://jenkins.includeos.org/buildStatus/icon?job=shield_master_bundle)](https://jenkins.includeos.org/job/shield_master_bundle/) |
24+
| Dev | [![Build Status](https://jenkins.includeos.org/buildStatus/icon?job=shield_dev_bundle)](https://jenkins.includeos.org/job/shield_dev_bundle/) |
2525

2626
### Key features
2727

test/fs/integration/fat16/test.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
import sys
44
import os
55

6-
includeos_src = os.environ['INCLUDEOS_SRC']
6+
includeos_src = os.environ.get('INCLUDEOS_SRC',
7+
os.path.realpath(os.path.join(os.getcwd(), os.path.dirname(__file__))).split('/test')[0])
78
sys.path.insert(0,includeos_src + "/test")
89

910
from subprocess import call

test/fs/integration/fat32/test.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
import sys
44
import os
55

6-
includeos_src = os.environ['INCLUDEOS_SRC']
6+
includeos_src = os.environ.get('INCLUDEOS_SRC',
7+
os.path.realpath(os.path.join(os.getcwd(), os.path.dirname(__file__))).split('/test')[0])
78
sys.path.insert(0,includeos_src + "/test")
89

910
from subprocess import call

test/fs/integration/memdisk/test.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
import sys
44
import os
55

6-
includeos_src = os.environ['INCLUDEOS_SRC']
6+
includeos_src = os.environ.get('INCLUDEOS_SRC',
7+
os.path.realpath(os.path.join(os.getcwd(), os.path.dirname(__file__))).split('/test')[0])
78
sys.path.insert(0,includeos_src + "/test")
89

910
from subprocess import call

test/fs/integration/virtio_block/test.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
import subprocess
44
import os
55

6-
includeos_src = os.environ['INCLUDEOS_SRC']
6+
includeos_src = os.environ.get('INCLUDEOS_SRC',
7+
os.path.realpath(os.path.join(os.getcwd(), os.path.dirname(__file__))).split('/test')[0])
78
sys.path.insert(0,includeos_src + "/test")
89
subprocess.call(['./image.sh'])
910

test/hw/integration/serial/test.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
import sys
44
import os
55

6-
includeos_src = os.environ['INCLUDEOS_SRC']
6+
includeos_src = os.environ.get('INCLUDEOS_SRC',
7+
os.path.realpath(os.path.join(os.getcwd(), os.path.dirname(__file__))).split('/test')[0])
78
sys.path.insert(0,includeos_src + "/test")
89

910
from subprocess import call

test/hw/integration/virtio_queue/Makefile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,14 @@ FILES = service.cpp
1111

1212
LOCAL_INCLUDES=-I$(INCLUDEOS_SRC)/test/lest/include/lest -I$(PWD)/mod/GSL/include
1313

14+
# IncludeOS_SRC location
15+
ifndef INCLUDEOS_SRC
16+
current_dir := $(shell pwd)
17+
LOCAL_INCLUDES=-I$(abspath $(current_dir)/../../../lest/include/lest) -I$(abspath $(current_dir)/../../../../mod/GSL/include)
18+
else
19+
LOCAL_INCLUDES=-I$(INCLUDEOS_SRC)/test/lest/include/lest -I$(INCLUDEOS_SRC)/mod/GSL/include
20+
endif
21+
1422
# Your disk image
1523
DISK=
1624

test/kernel/integration/custom_init/Makefile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,13 @@ SERVICE_NAME = Custom pre-service initialization
99
# Your service parts
1010
FILES = service.cpp custom_init1.cpp custom_init2.cpp custom_init3.cpp
1111

12-
LOCAL_INCLUDES = -I$(INCLUDEOS_SRC)/test/lest/include/lest
12+
# IncludeOS_SRC location
13+
ifndef INCLUDEOS_SRC
14+
current_dir := $(shell pwd)
15+
LOCAL_INCLUDES=-I$(abspath $(current_dir)/../../../lest/include/lest)
16+
else
17+
LOCAL_INCLUDES=-I$(INCLUDEOS_SRC)/test/lest/include/lest
18+
endif
1319

1420
# Your disk image
1521
DISK=

test/kernel/integration/custom_init/test.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
import sys
44
import os
55

6-
includeos_src = os.environ['INCLUDEOS_SRC']
6+
includeos_src = os.environ.get('INCLUDEOS_SRC',
7+
os.path.realpath(os.path.join(os.getcwd(), os.path.dirname(__file__))).split('/test')[0])
78
sys.path.insert(0,includeos_src + "/test")
89

910
import vmrunner

test/kernel/integration/memmap/Makefile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,13 @@ SERVICE_NAME = Memmap Test Service
99
# Your service parts
1010
FILES = service.cpp
1111

12-
LOCAL_INCLUDES = -I$(INCLUDEOS_SRC)/test/lest/include/lest
12+
# IncludeOS_SRC location
13+
ifndef INCLUDEOS_SRC
14+
current_dir := $(shell pwd)
15+
LOCAL_INCLUDES=-I$(abspath $(current_dir)/../../../lest/include/lest)
16+
else
17+
LOCAL_INCLUDES=-I$(INCLUDEOS_SRC)/test/lest/include/lest
18+
endif
1319

1420
# Your disk image
1521
DISK=

0 commit comments

Comments
 (0)