diff --git a/.gitmodules b/.gitmodules index e9e4677..7c8e5aa 100644 --- a/.gitmodules +++ b/.gitmodules @@ -2,9 +2,6 @@ path = deps/CASE-Examples url = https://github.com/casework/CASE-Examples.git branch = master -[submodule "deps/case-implementation-plaso"] - path = deps/case-implementation-plaso - url = https://github.com/casework/case-implementation-plaso.git [submodule "deps/dfxml"] path = deps/dfxml url = https://github.com/dfxml-working-group/dfxml_python.git diff --git a/Makefile b/Makefile index c355a0e..e25387b 100644 --- a/Makefile +++ b/Makefile @@ -30,24 +30,15 @@ all: \ setup # Removing this flag file checks for added or removed submodules, but does not cause a submodule update to occur on submodules that have already been checked out at least once. -.git_submodule_init: \ - .gitmodules - git submodule sync - test -r deps/case/.git || \ - (git submodule init deps/case && git submodule update deps/case) - test -r deps/case-api-python/.git || \ - (git submodule init deps/case-api-python && git submodule update deps/case-api-python) - test -r deps/case-implementation-plaso/.git || \ - (git submodule init deps/case-implementation-plaso && git submodule update deps/case-implementation-plaso) - test -r deps/dfxml/.git || \ - (git submodule init deps/dfxml && git submodule update deps/dfxml) - test -r deps/dfxml_schema/.git || \ - (git submodule init deps/dfxml_schema && git submodule update deps/dfxml_schema) - touch $@ - .git_submodule_init.done.log: \ .gitmodules - git submodule update --init + test -r deps/CASE-Examples/Makefile || \ + git submodule update --init deps/CASE-Examples + test -r deps/dfxml/Makefile || \ + git submodule update --init deps/dfxml + $(MAKE) \ + --directory deps/dfxml \ + .git_submodule_init.done.log touch $@ # This virtual environment is meant to be built once and then persist, even through 'make clean'. @@ -146,10 +137,6 @@ clean-tests: clean deps/dfxml/setup.cfg: \ - .git_submodule_init + .git_submodule_init.done.log touch -c $@ test -r $@ - -setup: \ - .setup_complete - @echo "Setup complete." diff --git a/deps/case-implementation-plaso b/deps/case-implementation-plaso deleted file mode 160000 index 87e86ed..0000000 --- a/deps/case-implementation-plaso +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 87e86ed1b137079d2861bf6ec6ead5bd84db86a1 diff --git a/tests/Makefile b/tests/Makefile index 8b15f9e..deed191 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -20,10 +20,10 @@ PYTHON3 ?= python3 top_srcdir := $(shell cd .. ; pwd) -dfxml_xsd := $(top_srcdir)/deps/dfxml_schema/dfxml.xsd - dfxml_top_srcdir := $(top_srcdir)/deps/dfxml +dfxml_xsd := $(dfxml_top_srcdir)/dependencies/dfxml_schema/dfxml.xsd + objects_py_dependencies := \ $(dfxml_top_srcdir)/dfxml/__init__.py \ $(dfxml_top_srcdir)/dfxml/objects.py @@ -48,10 +48,7 @@ all: check-basic \ check-basic-TODO \ check-case_examples \ - check-case_implementation_plaso_examples \ - check-case_implementation_plaso_examples-TODO \ clean-case_examples \ - clean-case_implementation_plaso_examples \ check-cli \ check-mypy \ clean-recursive @@ -86,13 +83,11 @@ check: \ check-doctest \ check-cli \ check-package \ - check-case_examples \ - check-case_implementation_plaso_examples + check-case_examples @echo "Unit tests pass!" check-TODO: \ - check-basic-TODO \ - check-case_implementation_plaso_examples-TODO + check-basic-TODO check-basic: \ empty.json \ @@ -107,14 +102,6 @@ check-case_examples: \ check-basic $(MAKE) -C case_examples check -check-case_implementation_plaso_examples: \ - check-basic - $(MAKE) -C case_implementation_plaso_examples check - -check-case_implementation_plaso_examples-TODO: \ - check-case_implementation_plaso_examples - $(MAKE) -C case_implementation_plaso_examples check-TODO - check-cli: \ .venv.done.log $(MAKE) \ @@ -162,12 +149,8 @@ clean: \ clean-case_examples: $(MAKE) -C case_examples clean -clean-case_implementation_plaso_examples: - $(MAKE) -C case_implementation_plaso_examples clean - clean-recursive: \ - clean-case_examples \ - clean-case_implementation_plaso_examples + clean-case_examples empty.json: \ .venv.done.log \ diff --git a/tests/case_examples/Makefile b/tests/case_examples/Makefile index 81578ce..4c15d15 100644 --- a/tests/case_examples/Makefile +++ b/tests/case_examples/Makefile @@ -18,21 +18,6 @@ SHELL = /bin/bash top_srcdir := ../.. -#BOOKMARK^ -dfxml_xsd := $(top_srcdir)/deps/dfxml_schema/dfxml.xsd - -dfxml_top_srcdir := $(top_srcdir)/deps/dfxml - -objects_py_dependencies := \ - $(dfxml_top_srcdir)/dfxml/__init__.py \ - $(dfxml_top_srcdir)/dfxml/objects.py - -case_to_dfxml_dependencies := \ - $(objects_py_dependencies) \ - $(top_srcdir)/case_to_dfxml.py - -#BOOKMARKv - all: Oresteia.dfxml: \ diff --git a/tests/case_examples/example.mk b/tests/case_examples/example.mk index 2eb569e..4d866e5 100644 --- a/tests/case_examples/example.mk +++ b/tests/case_examples/example.mk @@ -28,10 +28,10 @@ endif top_srcdir := ../.. -dfxml_xsd := $(top_srcdir)/deps/dfxml_schema/dfxml.xsd - dfxml_top_srcdir := $(top_srcdir)/deps/dfxml +dfxml_xsd := $(dfxml_top_srcdir)/dependencies/dfxml_schema/dfxml.xsd + objects_py_dependencies := \ $(dfxml_top_srcdir)/dfxml/__init__.py \ $(dfxml_top_srcdir)/dfxml/objects.py diff --git a/tests/case_implementation_plaso_examples/.gitignore b/tests/case_implementation_plaso_examples/.gitignore deleted file mode 100644 index 11f8309..0000000 --- a/tests/case_implementation_plaso_examples/.gitignore +++ /dev/null @@ -1 +0,0 @@ -*.validates.log diff --git a/tests/case_implementation_plaso_examples/Makefile b/tests/case_implementation_plaso_examples/Makefile deleted file mode 100644 index 0653fa2..0000000 --- a/tests/case_implementation_plaso_examples/Makefile +++ /dev/null @@ -1,119 +0,0 @@ -#!/usr/bin/make -f - -# Portions of this file contributed by NIST are governed by the -# following statement: -# -# This software was developed at the National Institute of Standards -# and Technology by employees of the Federal Government in the course -# of their official duties. Pursuant to Title 17 Section 105 of the -# United States Code, this software is not subject to copyright -# protection within the United States. NIST assumes no responsibility -# whatsoever for its use by other parties, and makes no guarantees, -# expressed or implied, about its quality, reliability, or any other -# characteristic. -# -# We would appreciate acknowledgement if the software is used. - -SHELL = /bin/bash - -top_srcdir := ../.. - -dfxml_xsd := $(top_srcdir)/deps/dfxml_schema/dfxml.xsd - -dfxml_top_srcdir := $(top_srcdir)/deps/dfxml - -objects_py_dependencies := \ - $(dfxml_top_srcdir)/dfxml/__init__.py \ - $(dfxml_top_srcdir)/dfxml/objects.py - -case_to_dfxml_dependencies := \ - $(objects_py_dependencies) \ - $(top_srcdir)/case_to_dfxml.py - -all: - -.PHONY: \ - check-TODO - -# Retain inferred .dfxml files. -# C/o: https://www.gnu.org/software/make/manual/html_node/Chained-Rules.html -.PRECIOUS: \ - %.dfxml - -%.dfxml: \ - ../../deps/case-implementation-plaso/examples/% \ - $(dfxml_xsd) \ - $(case_to_dfxml_dependencies) \ - ../.venv.done.log - rm -f __$@ _$@ - source ../venv/bin/activate \ - && python ../../case_to_dfxml.py \ - $< \ - __$@ - xmllint \ - --format \ - --schema $(dfxml_xsd) \ - __$@ \ - > _$@ - rm __$@ - mv _$@ $@ - -#TODO These files have a problem parsing. Issue filed here: -# https://github.com/casework/case-implementation-plaso/issues/2 -check-TODO: \ - android_calls.xml.dfxml \ - android_sms.xml.dfxml \ - lvm.xml.dfxml \ - mft.xml.dfxml \ - skype.xml.dfxml \ - tsk_volume_system.xml - @echo "INFO:Makefile:The check-TODO targets now pass and can be put back into place in the validates.log dependencies." >&2 - -android_calls.validates.log: \ - android_calls.json.dfxml \ - android_calls.ttl.dfxml - touch $@ - -android_sms.validates.log: \ - android_sms.json.dfxml \ - android_sms.ttl.dfxml - touch $@ - -bz2.validates.log: \ - bz2.json.dfxml \ - bz2.ttl.dfxml \ - bz2.xml.dfxml - touch $@ - -check: \ - android_calls.validates.log \ - android_sms.validates.log \ - bz2.validates.log \ - lvm.validates.log \ - mft.validates.log \ - skype.validates.log \ - tsk_volume_system.validates.log - -clean: - @rm -f \ - *.dfxml - -lvm.validates.log: \ - lvm.json.dfxml \ - lvm.ttl.dfxml - touch $@ - -mft.validates.log: \ - mft.json.dfxml \ - mft.ttl.dfxml - touch $@ - -skype.validates.log: \ - skype.json.dfxml \ - skype.ttl.dfxml - touch $@ - -tsk_volume_system.validates.log: \ - tsk_volume_system.json.dfxml \ - tsk_volume_system.ttl.dfxml - touch $@