Ejemplo n.º 1
0
 def test_alpha_vsn(self):
     self.do_run(st.AppDesc(user_name = "Smoke Test User",
                            email = "*****@*****.**",
                            copyright_holder = "Smoke Test Copy, LLC.",
                            project_name = "smprj_version1",
                            project_version = "V1922A",
                            app_names = ["app1"]))
Ejemplo n.º 2
0
 def test_fail(self):
     self.do_run(st.AppDesc(user_name = "Smoke Test User",
                            email = "*****@*****.**",
                            copyright_holder = "Smoke Test Copy, LLC.",
                            project_name = "reltest",
                            project_version = "0.134.0.0",
                            app_names = ["app1", "app2", "app3", "app3", "app4"]))
Ejemplo n.º 3
0
 def test_erts_vsn(self):
     self.do_run(
         st.AppDesc(user_name="Smoke Test User",
                    email="*****@*****.**",
                    copyright_holder="Smoke Test Copy, LLC.",
                    project_name="smprj_version2",
                    project_version="R12B3-122",
                    app_names=["app1", "fubyap1"]))
Ejemplo n.º 4
0
    def test_hooks(self):
        app_desc = st.AppDesc(user_name="Smoke Test User",
                              email="*****@*****.**",
                              copyright_holder="Smoke Test Copy, LLC.",
                              project_name="smprj",
                              project_version="0.21.0.0",
                              app_names=["app1", "app2", "app3"])

        self.do_run(app_desc)
        builddir = os.path.join("_build", app_desc.project_name)
Ejemplo n.º 5
0
    def test_gen_name(self):
        appdesc = st.AppDesc(
            user_name="Smoke Test Gen",
            email="*****@*****.**",
            copyright_holder="Smoke Test Copy, LLC.",
            # This needs to match the gen name since
            # we are overriding it
            project_name="foo",
            project_version="0.134.0.0")

        self.run_custom_gen(appdesc)
Ejemplo n.º 6
0
    def test_configless_project(self):
        app_desc = st.AppDesc(user_name="Smoke Test User",
                              email="*****@*****.**",
                              copyright_holder="Smoke Test Copy, LLC.",
                              project_name="configless_project",
                              project_version="0.1.0.0",
                              app_names=["app1", "app2", "app3"])

        self.do_run(app_desc)

        os.remove(os.path.join("sinan.config"))

        self.clean_configless(app_desc)
        self.build_configless(app_desc)
Ejemplo n.º 7
0
    def test_foo(self):
        app_desc = st.AppDesc(user_name="Smoke Test User",
                              email="*****@*****.**",
                              copyright_holder="Smoke Test Copy, LLC.",
                              project_name="reltest",
                              project_version="0.134.0.0",
                              app_names=["app1", "app2", "app3", "app4"])

        self.do_run(app_desc)

        self.gen_release_file(app_desc)
        for r in ["r1", "r2", "r3", "r4"]:

            def run_dist(self, child):
                child.expect("starting: dist")
                child.expect(pexpect.EOF)

            self.release_name = r
            self.release_version = app_desc.project_version

            ((st.sinan("-r %s dist" % r)(run_dist))(self))

            self.assert_dirs_exist("_build",
                                   [r, "releases", self.release_version])

            self.assert_files_exist("_build", [
                r, "releases", self.release_version, self.release_name + ".rel"
            ])

            self.assert_files_exist("_build", [
                r, "releases", self.release_version,
                self.release_name + ".boot"
            ])

            self.assert_files_exist("_build", [
                r, "releases", self.release_version,
                self.release_name + ".script"
            ])

            self.assert_files_exist("_build", [
                r, "tar",
                "%s-%s.tar.gz" % (self.release_name, self.release_version)
            ])

        BuildDir = os.path.join("_build", "r1")
        BuildDirList = os.listdir(BuildDir)
        self.assertTrue(
            len([x for x in BuildDirList if x.startswith("erts-")]) == 1)
Ejemplo n.º 8
0
    def test_configless_single_app(self):
        app_desc = st.AppDesc(user_name="Smoke Test User",
                              email="*****@*****.**",
                              copyright_holder="Smoke Test Copy, LLC.",
                              project_name="app1",
                              project_version="0.1.0.0",
                              app_names=["app1"])

        self.do_run(app_desc)

        shutil.move(os.path.join("lib", "app1", "src"), ".")

        shutil.move(os.path.join("lib", "app1", "include"), ".")

        shutil.move(os.path.join("lib", "app1", "ebin"), ".")

        shutil.rmtree(os.path.join("lib"))
        os.remove(os.path.join("sinan.config"))

        self.do_clean(app_desc)

        self.do_build(app_desc)