From c3f0505ddca1eab4a9fbfaaa83e1614b3d202636 Mon Sep 17 00:00:00 2001 From: "Gustavo J. A. M. Carneiro" Date: Sun, 6 Apr 2008 21:57:11 +0100 Subject: [PATCH] Create regression traces tarball automatically on waf dist. --- wscript | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/wscript b/wscript index f33f46255..02682e459 100644 --- a/wscript +++ b/wscript @@ -49,9 +49,22 @@ REGRESSION_TRACES_DIR_NAME = "ns-3-dev-ref-traces" def dist_hook(): + import tarfile shutil.rmtree("doc/html", True) shutil.rmtree("doc/latex", True) + ## Create a tar.bz2 file with the traces + traces_dir = os.path.join("regression", "ns-3-dev-ref-traces") + if not os.path.isdir(traces_dir): + Params.warning("Not creating traces archive: the %s directory does not exist" % traces_dir) + else: + tar = tarfile.open(os.path.join("..", "ns-%s-ref-traces.tar.bz2" % VERSION), 'w:bz2') + tar.add(traces_dir, "ns-3-dev-ref-traces") + tar.close() + ## Now remove it; we do not ship the traces with the main tarball... + shutil.rmtree(traces_dir, True) + + def set_options(opt): def debug_option_callback(option, opt, value, parser):