diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7b847f710824dea96dbb414e1c19d1472178a188..ed996469f2a5da5acc07253a8d98351bbf74e642 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -103,7 +103,7 @@ prepare debian docker image with 4.09.0 and all dependencies: stage: build script: - docker build --tag coccinelle-with-$from . -f ci/Dockerfile.build - --build-arg from=$from + --build-arg from=$from --build-arg configure_options=$configure_options build with debian 3.12: <<: *build_coccinelle_def @@ -199,6 +199,12 @@ test with debian 4.09 with all dependencies: variables: from: debian-4.09.0-all-dependencies +test with debian 4.09 without python: + <<: *test_coccinelle_def + variables: + from: debian-4.09.0 + configure_options: --disable-python + test with opensuse/leap: <<: *test_coccinelle_def variables: diff --git a/ci/Dockerfile.build b/ci/Dockerfile.build index 16cbc1f55b7e2e68d6e40589d25e42ec342dc0df..036112472f5d9327ccf578757648c4843c8af42a 100644 --- a/ci/Dockerfile.build +++ b/ci/Dockerfile.build @@ -1,4 +1,5 @@ ARG from FROM $from COPY --chown=ci:users . /home/ci/coccinelle/ -RUN cd /home/ci/coccinelle && ./autogen && ./configure && make +ARG configure_options +RUN cd /home/ci/coccinelle && ./autogen && ./configure $configure_options && make diff --git a/python/no_pycocci.ml b/python/no_pycocci.ml index e35eb41e8ef6822d10d944acb64a4eb0366eb871..1009317204c65e0549d43382ed39d5492703c651 100644 --- a/python/no_pycocci.ml +++ b/python/no_pycocci.ml @@ -95,4 +95,7 @@ let py_finalize () = let run_constraint args pos body = failwith errmsg +let run_fresh_id _ _ _ = + failwith errmsg + let flush_stdout_and_stderr () = () diff --git a/python/no_pycocci.mli b/python/no_pycocci.mli new file mode 100644 index 0000000000000000000000000000000000000000..3319b303c46295a0024e25a9437621f1c5a54c3f --- /dev/null +++ b/python/no_pycocci.mli @@ -0,0 +1,83 @@ +module StringMap : + sig + type key = String.t + type 'a t = 'a Map.Make(String).t + val empty : 'a t + val is_empty : 'a t -> bool + val mem : key -> 'a t -> bool + val add : key -> 'a -> 'a t -> 'a t + val update : key -> ('a option -> 'a option) -> 'a t -> 'a t + val singleton : key -> 'a -> 'a t + val remove : key -> 'a t -> 'a t + val merge : + (key -> 'a option -> 'b option -> 'c option) -> 'a t -> 'b t -> 'c t + val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t + val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int + val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool + val iter : (key -> 'a -> unit) -> 'a t -> unit + val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b + val for_all : (key -> 'a -> bool) -> 'a t -> bool + val exists : (key -> 'a -> bool) -> 'a t -> bool + val filter : (key -> 'a -> bool) -> 'a t -> 'a t + val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t + val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t + val cardinal : 'a t -> int + val bindings : 'a t -> (key * 'a) list + val min_binding : 'a t -> key * 'a + val min_binding_opt : 'a t -> (key * 'a) option + val max_binding : 'a t -> key * 'a + val max_binding_opt : 'a t -> (key * 'a) option + val choose : 'a t -> key * 'a + val choose_opt : 'a t -> (key * 'a) option + val split : key -> 'a t -> 'a t * 'a option * 'a t + val find : key -> 'a t -> 'a + val find_opt : key -> 'a t -> 'a option + val find_first : (key -> bool) -> 'a t -> key * 'a + val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option + val find_last : (key -> bool) -> 'a t -> key * 'a + val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option + val map : ('a -> 'b) -> 'a t -> 'b t + val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t + val to_seq : 'a t -> (key * 'a) Seq.t + val to_seq_from : key -> 'a t -> (key * 'a) Seq.t + val add_seq : (key * 'a) Seq.t -> 'a t -> 'a t + val of_seq : (key * 'a) Seq.t -> 'a t + end +exception Pycocciexception +val errmsg : string +val python_support : bool +val check_return_value : 'a -> 'b +val check_int_return_value : 'a -> 'b +val initialised : bool ref +val cocci_file_name : string ref +val get_module : 'a -> 'b +val is_module_loaded : 'a -> 'b +val load_module : 'a -> 'b +val pycocci_init : unit -> unit +val split_fqn : 'a -> 'b +val pycocci_get_class_type : 'a -> 'b +val pycocci_instantiate_class : 'a -> 'b -> 'c +val inc_match : bool ref +val exited : bool ref +val include_match : 'a -> 'b +val sp_exit : 'a -> 'b +val build_method : 'a * 'b * 'c -> 'd -> 'e -> 'f -> 'g +val build_class : 'a -> 'b -> 'c -> 'd -> 'e +val has_environment_binding : 'a -> 'b -> 'c +val get_cocci_file : 'a -> 'b +val build_classes : 'a -> 'b +val build_variable : 'a -> 'b -> 'c +val contains_binding : 'a -> 'b * ('c * 'd) * 'e -> 'f +val construct_variables : 'a -> 'b -> 'c +val construct_script_variables : 'a -> 'b +val retrieve_script_variables : 'a -> 'b +val set_coccifile : string -> unit +val pickle_variable : 'a -> 'b +val unpickle_variable : 'a -> 'b -> 'c +val pyrun_simplestring : 'a -> 'b +val run : 'a -> 'b +val py_isinitialized : unit -> 'a +val py_finalize : unit -> 'a +val run_constraint : 'a -> 'b -> 'c -> 'd +val run_fresh_id : 'a -> 'b -> 'c -> 'd +val flush_stdout_and_stderr : unit -> unit