Exemplo n.º 1
0
def updateAction ():
    roseDirectory = selectROSEVersion ()
    makeNeeded = copyFilesIfNeeded (roseDirectory)
    if makeNeeded:
        makeROSE (roseDirectory)
        makeInstallROSE (roseDirectory)
        if queryYesNo("ROSE installation has changed. Shall I rebuild the translator?") == "yes":
            rebuildTranslator ()
        else:
            debug.verboseMessage("ROSE installation has changed but the translator has NOT been rebuilt. Therefore, there may be errors when using the translator.")
    else:
        debug.verboseMessage("None of the files in the ROSE distribution have changed. Therefore, nothing to do.")

if opts.check:
    checkEnvironment ()
    boostDirectory = getBoostPath ()
    debug.verboseMessage("Your environment is sane.")

if opts.build:
    buildAction ()
    debug.verboseMessage("ROSE build completed.")

if opts.update:
    updateAction ()
    debug.verboseMessage("Updating completed.")

if not opts.build and not opts.update and not opts.check:
    debug.exitMessage("No actions selected. Use -h for options")

Exemplo n.º 2
0
			# Grab both standard output and standard error streams from the process
			stdoutLines, stderrLines = proc.communicate()

			if proc.returncode != 0:
				if testResult == proc.returncode:
					debug.verboseMessage("Test case #%s passed" % (testNum))
				else:
					debug.verboseMessage("Test case #%s did NOT pass" % (testNum))
					testReportLines.append("========== Test %s ==========\n" % (testNum))
					for line in stderrLines.splitlines():
						testReportLines.append(line + "\n")
					testReportLines.append("\n\n")
			else:
				if testResult == 0:				
					debug.verboseMessage("Test case #%s passed" % (testNum))
					manageNewFiles (timeStamp, testNum)
				else:
					debug.verboseMessage("Test case #%s did NOT pass" % (testNum))
	# End of test for loop
	writeTestReport(testReportLines)

if opts.clean:
	clean ()

if opts.run:
	runTests ()

if not opts.clean and not opts.run:
	debug.exitMessage("No actions selected. Use %s for options" % helpShortFlag)
Exemplo n.º 3
0
    roseDirectory = selectROSEVersion()
    makeNeeded = copyFilesIfNeeded(roseDirectory)
    if makeNeeded:
        makeROSE(roseDirectory)
        makeInstallROSE(roseDirectory)
        if queryYesNo("ROSE installation has changed. Shall I rebuild the translator?") == "yes":
            rebuildTranslator()
        else:
            debug.verboseMessage(
                "ROSE installation has changed but the translator has NOT been rebuilt. Therefore, there may be errors when using the translator."
            )
    else:
        debug.verboseMessage("None of the files in the ROSE distribution have changed. Therefore, nothing to do.")


if opts.check:
    checkEnvironment()
    boostDirectory = getBoostPath()
    debug.verboseMessage("Your environment is sane.")

if opts.build:
    buildAction()
    debug.verboseMessage("ROSE build completed.")

if opts.update:
    updateAction()
    debug.verboseMessage("Updating completed.")

if not opts.build and not opts.update and not opts.check:
    debug.exitMessage("No actions selected. Use -h for options")
Exemplo n.º 4
0
					proc = Popen(cmd,
						shell=True,
						executable='/bin/bash',
						stderr=PIPE,
						stdout=PIPE)

					proc.communicate()
		        
				else:
					inRepo.append(fullPath)

def output ():
	if inRepo:
    		print("===== These files already exist in the repository =====")
    		for f in inRepo:
        		print(f)
	if added:
    		print("===== Added the following files =====")
    		for f in added:
        		print(f)

if opts.dir is None:
	debug.exitMessage("You must supply a directory on the command line.")
elif not os.path.isdir(opts.dir):
	debug.exitMessage("The directory '" + opts.dir + "' is not a valid directory")
else:
	add()
	if opts.output:
		output()    

Exemplo n.º 5
0
                                 executable='/bin/bash',
                                 stderr=PIPE,
                                 stdout=PIPE)

                    proc.communicate()

                else:
                    inRepo.append(fullPath)


def output():
    if inRepo:
        print("===== These files already exist in the repository =====")
        for f in inRepo:
            print(f)
    if added:
        print("===== Added the following files =====")
        for f in added:
            print(f)


if opts.dir is None:
    debug.exitMessage("You must supply a directory on the command line.")
elif not os.path.isdir(opts.dir):
    debug.exitMessage("The directory '" + opts.dir +
                      "' is not a valid directory")
else:
    add()
    if opts.output:
        output()