From fbb6fc06c639989b93d8a67e3b36014bc4330c1b Mon Sep 17 00:00:00 2001 From: Dave Smith Date: Mon, 14 Jun 2010 18:14:23 -0600 Subject: Adding test for new release generation overlay system --HG-- extra : rebase_source : cd143fdf55773dcfbeeda687570b226def42e4f5 --- inttest/rgen1/reltool.config | 31 +++++++++++++++++++++++++++++++ inttest/rgen1/rgen1_rt.erl | 18 ++++++++++++++++++ inttest/rgen1/test.config | 1 + inttest/rgen1/vars.config | 1 + 4 files changed, 51 insertions(+) create mode 100644 inttest/rgen1/reltool.config create mode 100644 inttest/rgen1/rgen1_rt.erl create mode 100644 inttest/rgen1/test.config create mode 100644 inttest/rgen1/vars.config (limited to 'inttest/rgen1') diff --git a/inttest/rgen1/reltool.config b/inttest/rgen1/reltool.config new file mode 100644 index 0000000..c6e31f5 --- /dev/null +++ b/inttest/rgen1/reltool.config @@ -0,0 +1,31 @@ +%% -*- tab-width: 4;erlang-indent-level: 4;indent-tabs-mode: nil -*- +%% ex: ts=4 sw=4 et +{sys, [ + {rel, "rgen1", "0.1", + [ + kernel, + stdlib, + sasl, + crypto + ]}, + {rel, "start_clean", "", + [ + kernel, + stdlib + ]}, + {boot_rel, "rgen1"}, + {profile, embedded}, + {excl_sys_filters, ["^bin/.*", + "^erts.*/bin/(dialyzer|typer)"]}, + {excl_archive_filters, [".*"]}, + {app, sasl, [{incl_cond, include}]} + ]}. + +{target_dir, "mytarget"}. + +{overlay_vars, "vars.config"}. + +{overlay, [ + {mkdir, "data"}, + {template, "test.config", "etc/test.config"} + ]}. diff --git a/inttest/rgen1/rgen1_rt.erl b/inttest/rgen1/rgen1_rt.erl new file mode 100644 index 0000000..68b6eaf --- /dev/null +++ b/inttest/rgen1/rgen1_rt.erl @@ -0,0 +1,18 @@ +-module(rgen1_rt). + +-compile(export_all). + +%% Exercise release generation w/ templating + +files() -> + [ + {copy, "reltool.config"}, + {copy, "test.config"}, + {copy, "vars.config"}, + {copy, "../../rebar"} + ]. + +run(_Dir) -> + {ok, _} = retest_sh:run("./rebar -v generate", []), + true = filelib:is_dir("mytarget"), + ok. diff --git a/inttest/rgen1/test.config b/inttest/rgen1/test.config new file mode 100644 index 0000000..2fd1385 --- /dev/null +++ b/inttest/rgen1/test.config @@ -0,0 +1 @@ +{web_port, {{web_port}} }. diff --git a/inttest/rgen1/vars.config b/inttest/rgen1/vars.config new file mode 100644 index 0000000..174c51e --- /dev/null +++ b/inttest/rgen1/vars.config @@ -0,0 +1 @@ +{web_port, 1234}. -- cgit v1.1