aboutsummaryrefslogtreecommitdiff
path: root/scripts/test.py
blob: d24e31b3f7bfc3c082fcd050de1883057cf0c17a (plain)
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
#!/usr/bin/env python3
import os
import sys

from conf import conf
from conf import sf
import initialize
import kernel
import boot
import database

def test():
	initialize.base()
	initialize.parse_kconfig()
	print("-- Make --")
	conf.kernel_make_output = True
	img = kernel.make('test')
	try:
		os.remove(sf(conf.jobfolder_linux_image))
	except FileNotFoundError:
		pass
	os.symlink(img, sf(conf.jobfolder_linux_image))
	conf.boot_output = True
	conf.parse_output = True
	print("-- Boot --")
	config = database.Config('0', 'test', img)
	boot.boot(config, False)

#################################################################################

if __name__ == "__main__":
	test()