diff --git a/build-userland b/build-userland index 53af851..4fe0b28 100755 --- a/build-userland +++ b/build-userland @@ -206,7 +206,7 @@ Default: build all examples that have their package dependencies met, e.g.: build_dir, dirpath_relative_root ) - common_objs_dir = [common_obj] + common_objs_dir = [] cc_flags_after = [] cc_flags_dir = cc_flags.copy() if dirpath_relative_root_components_len > 0: @@ -270,12 +270,15 @@ Default: build all examples that have their package dependencies met, e.g.: )) if my_path_properties['pedantic']: cc_flags_file.extend(['-pedantic', LF]) + common_objs_file = common_objs_dir.copy() + if my_path_properties['lkmc_common_obj']: + common_objs_file.append(common_obj) error = thread_pool.submit({ 'c_std': my_path_properties['c_std'], 'cc_flags': cc_flags_file + my_path_properties['cc_flags'], 'cc_flags_after': cc_flags_after, 'cxx_std': my_path_properties['cxx_std'], - 'extra_objs': common_objs_dir, + 'extra_objs': common_objs_file, 'in_path': in_path, 'out_path': self.resolve_userland_executable(in_path), }) diff --git a/path_properties.py b/path_properties.py index 72615ab..7a11230 100644 --- a/path_properties.py +++ b/path_properties.py @@ -22,6 +22,10 @@ class PathProperties: 'cxx_std', 'exit_status', 'interactive', + # We should get rid of this if we ever properly implement dependency graphs. + 'lkmc_common_obj', + # We were lazy to properly classify why we are skipping these tests. + # TODO get it done. 'skip_run_unclassified', 'more_than_1s', # The path does not generate an executable in itself, e.g. @@ -92,6 +96,7 @@ path_properties_tree = PrefixTree( 'cxx_std': None, 'exit_status': 0, 'interactive': False, + 'lkmc_common_obj': False, 'skip_run_unclassified': False, 'more_than_1s': False, # The path does not generate an executable in itself, e.g. @@ -106,8 +111,7 @@ path_properties_tree = PrefixTree( }, { 'userland': PrefixTree( - { - }, + {}, { 'arch': PrefixTree( { @@ -159,7 +163,6 @@ path_properties_tree = PrefixTree( 'c': PrefixTree( {}, { - 'assert_fail.c': PrefixTree({'exit_status': 1}), 'false.c': PrefixTree({'exit_status': 1}), 'getchar.c': PrefixTree({'interactive': True}), 'infinite_loop.c': PrefixTree({'more_than_1s': True}), @@ -167,6 +170,14 @@ path_properties_tree = PrefixTree( ), 'gcc': PrefixTree(gnu_extensions), 'kernel_modules': PrefixTree({**gnu_extensions, **{'requires_kernel_modules': True}}), + 'lkmc': PrefixTree( + {'lkmc_common_obj': True}, + { + + 'assert_fail.c': PrefixTree({'exit_status': 1}) + } + ), + 'libs': PrefixTree({'skip_run_unclassified': True}), 'linux': PrefixTree( {**gnu_extensions, **{'skip_run_unclassified': True}}, ), diff --git a/userland/lkmc/README.adoc b/userland/lkmc/README.adoc new file mode 100644 index 0000000..f06563e --- /dev/null +++ b/userland/lkmc/README.adoc @@ -0,0 +1 @@ +Testing mostly infrastructure of this repository rather than anything else. diff --git a/userland/c/add.c b/userland/lkmc/add.c similarity index 100% rename from userland/c/add.c rename to userland/lkmc/add.c diff --git a/userland/c/add.py b/userland/lkmc/add.py similarity index 100% rename from userland/c/add.py rename to userland/lkmc/add.py diff --git a/userland/c/assert_fail.c b/userland/lkmc/assert_fail.c similarity index 100% rename from userland/c/assert_fail.c rename to userland/lkmc/assert_fail.c