From 7a23550ae0491fc79c7fcdb2d7ab9eaf83491f2f Mon Sep 17 00:00:00 2001 From: Matt Guthaus Date: Wed, 9 Nov 2016 12:00:16 -0800 Subject: [PATCH 1/6] Improve error messages on misconfiguration of environment variables. --- compiler/calibre.py | 5 ++++- compiler/globals.py | 12 ++++++++++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/compiler/calibre.py b/compiler/calibre.py index a028c6ce..17dd45a5 100644 --- a/compiler/calibre.py +++ b/compiler/calibre.py @@ -103,7 +103,10 @@ def run_drc(name, gds_name): # TOTAL Original Layer Geometries: 106 (157) # TOTAL DRC RuleChecks Executed: 156 # TOTAL DRC Results Generated: 0 (0) - f = open(drc_runset['drcSummaryFile'], "r") + try: + f = open(drc_runset['drcSummaryFile'], "r") + except: + debug.error("Unable to retrieve DRC results file. Is calibre set up?",1) results = f.readlines() f.close() # those lines should be the last 3 diff --git a/compiler/globals.py b/compiler/globals.py index 713efb07..a4b60f94 100644 --- a/compiler/globals.py +++ b/compiler/globals.py @@ -141,7 +141,10 @@ def setup_paths(): global OPTS - OPENRAM_HOME = os.path.abspath(os.environ.get("OPENRAM_HOME")) + try: + OPENRAM_HOME = os.path.abspath(os.environ.get("OPENRAM_HOME")) + except: + debug.error("OPENRAM_HOME is not properly defined.",1) sys.path.append("{0}".format(OPENRAM_HOME)) sys.path.append("{0}/gdsMill".format(OPENRAM_HOME)) sys.path.append("{0}/tests".format(OPENRAM_HOME)) @@ -209,7 +212,12 @@ def import_tech(): OPTS.tech_name = OPTS.config.tech_name # environment variable should point to the technology dir - OPTS.openram_tech = os.path.abspath(os.environ.get("OPENRAM_TECH")) + "/" + OPTS.tech_name + try: + OPENRAM_TECH = os.path.abspath(os.environ.get("OPENRAM_TECH")) + except: + debug.error("OPENRAM_TECH is not properly defined.",1) + + OPTS.openram_tech = OPENRAM_TECH + "/" + OPTS.tech_name if not OPTS.openram_tech.endswith('/'): OPTS.openram_tech += "/" debug.info(1, "Technology path is " + OPTS.openram_tech) From 3bc6f1db5e4a1f696293acdc22dcfed9c059c264 Mon Sep 17 00:00:00 2001 From: Matt Guthaus Date: Wed, 9 Nov 2016 12:02:08 -0800 Subject: [PATCH 2/6] Update unit test to run with GitHub release. --- regress_daemon.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/regress_daemon.sh b/regress_daemon.sh index b324d249..5423b028 100755 --- a/regress_daemon.sh +++ b/regress_daemon.sh @@ -1,3 +1,4 @@ +#!/bin/bash #Check out a copy of the repository: #cd ~ #git clone gitosis@mada0.cse.ucsc.edu:openram.git unit_test @@ -6,9 +7,8 @@ #Add a command like this to the crontab to call the regression script # m h dom mon dow user command #0 0,12 * * * /mada/users/wubin6666/unit_test/trunk/regress_daemon.sh -!/bin/bash source /mada/software/setup.sh -export OPENRAM_HOME="/soe/mrg/unit_test/trunk/compiler" -export OPENRAM_TECH="/soe/mrg/unit_test/trunk/technology" -python ${HOME}/unit_test/trunk/regress_daemon.py -t freepdk45 -python ${HOME}/unit_test/trunk/regress_daemon.py -t scn3me_subm +export OPENRAM_HOME="/soe/mrg/unit_test/compiler" +export OPENRAM_TECH="/soe/mrg/unit_test/technology" +python ${HOME}/unit_test/regress_daemon.py -t freepdk45 +python ${HOME}/unit_test/regress_daemon.py -t scn3me_subm From e32557c36cf8d16dd7efa0a59cf5aa485aa90b98 Mon Sep 17 00:00:00 2001 From: Matt Guthaus Date: Wed, 9 Nov 2016 12:03:24 -0800 Subject: [PATCH 3/6] Fix path for GitHub regression. --- regress_daemon.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/regress_daemon.py b/regress_daemon.py index 0b7474f7..9c85fb77 100755 --- a/regress_daemon.py +++ b/regress_daemon.py @@ -23,9 +23,9 @@ FROM_FIELD = USER+"@ucsc.edu" LOCAL = "/soe/"+USER+"/unit_test" -sys.path.append(LOCAL+"/trunk/setup_scripts") -sys.path.append(LOCAL+"/trunk/compiler") -sys.path.append(LOCAL+"/trunk/compiler/tests") +sys.path.append(LOCAL+"/setup_scripts") +sys.path.append(LOCAL+"/compiler") +sys.path.append(LOCAL+"/compiler/tests") TECH_NAME = "NONE" From 7762e9d477a6741fe05a7c72219a8af4d301cda7 Mon Sep 17 00:00:00 2001 From: Matt Guthaus Date: Wed, 9 Nov 2016 12:04:43 -0800 Subject: [PATCH 4/6] Update repository to GitHub location --- regress_daemon.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/regress_daemon.py b/regress_daemon.py index 9c85fb77..7d870af0 100755 --- a/regress_daemon.py +++ b/regress_daemon.py @@ -31,7 +31,8 @@ TECH_NAME = "NONE" #REPOS = "http://gforge.soe.ucsc.edu/svn/openram/trunk" #REPOS = "http://svn.soe.ucsc.edu/svn/openram/trunk" -REPOS = "gitosis@mada0.soe.ucsc.edu:openram.git" +#REPOS = "gitosis@mada0.soe.ucsc.edu:openram.git" +REPOS = "git@github.com:mguthaus/OpenRAM.git" MAIL = "/usr/sbin/sendmail" From a61844b61b726089c6ac8030e088d75f57dcc15e Mon Sep 17 00:00:00 2001 From: Matt Guthaus Date: Wed, 9 Nov 2016 12:12:00 -0800 Subject: [PATCH 5/6] Removed final trunk from path --- regress_daemon.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/regress_daemon.py b/regress_daemon.py index 7d870af0..d2ea8d16 100755 --- a/regress_daemon.py +++ b/regress_daemon.py @@ -15,8 +15,8 @@ import datetime USER = getpass.getuser() -TO_FIELD = "openram@soe.ucsc.edu" -#TO_FIELD = "mrg@ucsc.edu" +#TO_FIELD = "openram@soe.ucsc.edu" +TO_FIELD = "mrg@ucsc.edu" #TO_FIELD = "bchen12@ucsc.edu" FROM_FIELD = USER+"@ucsc.edu" @@ -100,7 +100,7 @@ def remove_cached_files(): def regress(): print "Running Regressions" try: - os.chdir(LOCAL+"/trunk/compiler") + os.chdir(LOCAL+"/compiler") except OSError: print "Cannot find repository at " + LOCAL sys.exit(-2) From 7b492744d5e1277c6909660d1c81b54906f84087 Mon Sep 17 00:00:00 2001 From: Matt Guthaus Date: Wed, 9 Nov 2016 12:12:46 -0800 Subject: [PATCH 6/6] Fix to email field back to group --- regress_daemon.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/regress_daemon.py b/regress_daemon.py index d2ea8d16..b60e4687 100755 --- a/regress_daemon.py +++ b/regress_daemon.py @@ -15,8 +15,8 @@ import datetime USER = getpass.getuser() -#TO_FIELD = "openram@soe.ucsc.edu" -TO_FIELD = "mrg@ucsc.edu" +TO_FIELD = "openram@soe.ucsc.edu" +#TO_FIELD = "mrg@ucsc.edu" #TO_FIELD = "bchen12@ucsc.edu" FROM_FIELD = USER+"@ucsc.edu"