aboutsummaryrefslogtreecommitdiff
path: root/scripts/test.py
blob: 84eda1e6679b3ad4d13b06146a7594e3cbaade6f (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
33
34
35
36
37
#!/usr/bin/env python3
import os
import sys

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

def test():
	try:
		utils.dirtycheck()
	except exceptions.DirtyRepository as e:
		print("Warning: " + str(e))
	initialize.base()
	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()