--- /dev/null
+ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
+AM_MAKEFLAGS = --no-print-directory
+AUTOMAKE_OPTIONS = color-tests
+
+# remove target it the command fails
+.DELETE_ON_ERROR:
+
+# keep itermediate files
+.SECONDARY:
+
+pythondir = $(pyexecdir)
+
+CLEANFILES =
+DISTCLEANFILES =
+EXTRA_DIST =
+INSTALL_DIRS =
+noinst_DATA =
+
+
+AM_V_XSLT = $(AM_V_XSLT_$(V))
+AM_V_XSLT_ = $(AM_V_XSLT_$(AM_DEFAULT_VERBOSITY))
+AM_V_XSLT_0 = @echo " XSLT " $@;
+
+bin_SCRIPTS = \
+ nitsi
+
+CLEANFILES += \
+ nitsi
+
+nitsi_PYTHON = \
+ src/nitsi/__init__.py \
+ src/nitsi/disk.py \
+ src/nitsi/machine.py \
+ src/nitsi/network.py \
+ src/nitsi/recipe.py \
+ src/nitsi/serial_connection.py \
+ src/nitsi/test.py \
+ src/nitsi/virtual_environ.py
+
+
+nitsidir = $(pythondir)/nitsi
+
+# ------------------------------------------------------------------------------
+
+.PHONY: man
+man: $(MANPAGES) $(MANPAGES_HTML)
+
+if ENABLE_MANPAGES
+MANPAGES = \
+ man/nitsi.1
+
+MANPAGES_XML = $(patsubst %.1,%.xml,$(patsubst %.5,%.xml,$(MANPAGES)))
+MANPAGES_HTML = $(patsubst %.xml,%.html,$(MANPAGES_XML))
+
+man_MANS = \
+ $(MANPAGES)
+
+noinst_DATA += \
+ $(MANPAGES_HTML)
+
+CLEANFILES += \
+ $(man_MANS) \
+ $(MANPAGES_HTML)
+
+EXTRA_DIST += \
+ $(MANPAGES_XML) \
+ man/custom-html.xsl
+
+XSLTPROC_FLAGS = \
+ --nonet \
+ --stringparam man.output.quietly 1 \
+ --stringparam funcsynopsis.style ansi \
+ --stringparam man.th.extra1.suppress 1 \
+ --stringparam man.authors.section.enabled 1 \
+ --stringparam man.copyright.section.enabled 1
+
+XSLTPROC_COMMAND_MAN = \
+ $(AM_V_XSLT)$(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) \
+ http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
+
+XSLTPROC_COMMAND_HTML = \
+ $(AM_V_XSLT)$(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) $(srcdir)/man/custom-html.xsl $<
+
+man/%.1: man/%.xml
+ $(XSLTPROC_COMMAND_MAN)
+
+man/%.5: man/%.xml
+ $(XSLTPROC_COMMAND_MAN)
+
+man/%.html: man/%.xml man/custom-html.xsl
+ $(XSLTPROC_COMMAND_HTML)
+
+endif
+
+# ------------------------------------------------------------------------------
+
+substitutions = \
+ '|PACKAGE_NAME=$(PACKAGE_NAME)|' \
+ '|PACKAGE_VERSION=$(PACKAGE_VERSION)|'
+
+SED_PROCESS = \
+ $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
+ $(SED) $(subst '|,-e 's|@,$(subst =,\@|,$(subst |',|g',$(substitutions)))) \
+ < $< > $@
+
+nitsi: nitsi.in Makefile
+ $(SED_PROCESS)
\ No newline at end of file
--- /dev/null
+#!/bin/sh
+
+autoreconf --force --install
--- /dev/null
+AC_PREREQ([2.64])
+
+AC_INIT([nitsi],
+ [0.9],
+ [info@ipfire.org],
+ [nitsi],
+ [https://git.ipfire.org/pub/git/people/jschlag/nitsi.git])
+
+AC_CONFIG_MACRO_DIR([m4])
+AC_CONFIG_AUX_DIR([build-aux])
+
+AC_PREFIX_DEFAULT([/usr])
+
+AM_INIT_AUTOMAKE([
+ foreign
+ 1.11
+ -Wall
+ -Wno-portability
+ silent-rules
+ tar-pax
+ subdir-objects
+])
+AM_SILENT_RULES([yes])
+
+AC_PROG_LN_S
+AC_PROG_MKDIR_P
+AC_PROG_SED
+
+AC_PATH_PROG([XSLTPROC], [xsltproc])
+
+# Python
+AM_PATH_PYTHON([3.5])
+
+AX_PYTHON_MODULE([libvirt], [fatal], [python3])
+AX_PYTHON_MODULE([guestfs], [fatal], [python3])
+AX_PYTHON_MODULE([serial], [fatal], [python3])
+
+save_LIBS="$LIBS"
+
+# pkg-config
+PKG_PROG_PKG_CONFIG
+# This makes sure pkg.m4 is available.
+m4_pattern_forbid([^_?PKG_[A-Z_]+$],[*** pkg.m4 missing, please install pkg-config])
+
+# ------------------------------------------------------------------------------
+have_manpages=no
+AC_ARG_ENABLE(manpages, AS_HELP_STRING([--disable-man-pages],
+ [do not install man pages]))
+AS_IF([test "x$enable_manpages" != xno], [have_manpages=yes])
+AM_CONDITIONAL(ENABLE_MANPAGES, [test "x$have_manpages" = "xyes"])
+
+# ------------------------------------------------------------------------------
+
+AC_CONFIG_FILES([
+ Makefile
+])
+
+AC_OUTPUT
+AC_MSG_RESULT([
+ ${PACKAGE_NAME} ${VERSION}
+
+ prefix: ${prefix}
+ sysconfdir: ${sysconfdir}
+
+ Generate man-pages: ${have_manpages}
+])
\ No newline at end of file
#!/usr/bin/python3
-from test import test
+from nitsi.test import test
import logging
logger = logging.getLogger("nitsi")
import xml.etree.ElementTree as ET
-from disk import disk
+from nitsi.disk import disk
-from serial_connection import serial_connection
+from nitsi.serial_connection import serial_connection
import os
import libvirt
self.in_recursion = False
self.circle = circle
- self.log.debug("Tests we have already included: {}".format(self.circle))
+ self.log.debug("Recipes we have already included: {}".format(self.circle))
if not os.path.isfile(self.recipe_file):
self.log.error("{} is not a file".format(self.recipe_file))
import configparser
-from virtual_environ import virtual_environ
-from recipe import recipe
+from nitsi.virtual_environ import virtual_environ
+from nitsi.recipe import recipe
import logging
except BaseException as e:
logger.error("Could not get absolute path")
- self.log.debug(self.path)
+ self.log.debug("Path of this test is: {}".format(self.path))
self.settings_file = "{}/settings".format(self.path)
if not os.path.isfile(self.settings_file):
self.virtual_machines[name].login()
def load_recipe(self):
+ self.log.info("Going to load the recipe")
try:
self.recipe = recipe(self.recipe_file)
for line in self.recipe.recipe:
self.log.debug(line)
+
+ self.log.debug("This was the recipe")
except BaseException as e:
self.log.error("Failed to load recipe")
raise e
#!/usr/bin/python3
-from machine import machine
+from nitsi.machine import machine
-from network import network
+from nitsi.network import network
import os
import configparser