All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Sangorrin <daniel.sangorrin@toshiba.co.jp>
To: fuego@lists.linuxfoundation.org
Subject: [Fuego] [PATCH 1/3] of: use logdir argument instead of prolog.sh
Date: Tue,  4 Sep 2018 19:01:30 +0900	[thread overview]
Message-ID: <1536055292-34772-2-git-send-email-daniel.sangorrin@toshiba.co.jp> (raw)
In-Reply-To: <1536055292-34772-1-git-send-email-daniel.sangorrin@toshiba.co.jp>

This patch does not change the behavior of the program, it
still generates a prolog.sh in the current job's log
directory. It only prepares for the ability to leave
other files (such as a dynamically generated spec.json)
in the log directory.

Signed-off-by: Daniel Sangorrin <daniel.sangorrin@toshiba.co.jp>
---
 engine/scripts/overlays.sh |  2 +-
 engine/scripts/ovgen.py    | 10 +++++-----
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/engine/scripts/overlays.sh b/engine/scripts/overlays.sh
index bbc5d16..9e3eb55 100644
--- a/engine/scripts/overlays.sh
+++ b/engine/scripts/overlays.sh
@@ -73,7 +73,7 @@ function set_overlay_vars() {
 
     rm -f $LOGDIR/prolog.sh
 
-    run_python $OF_OVGEN $OF_DEBUG_ARGS --classdir $OF_CLASSDIRS --ovfiles $OF_DISTRIB_FILE $OF_BOARD_FILE $OF_BOARD_VAR_FILE --testdir $TESTDIR --testspec $TESTSPEC --output $LOGDIR/prolog.sh || abort_job "Error while prolog.sh file generation"
+    run_python $OF_OVGEN $OF_DEBUG_ARGS --classdir $OF_CLASSDIRS --ovfiles $OF_DISTRIB_FILE $OF_BOARD_FILE $OF_BOARD_VAR_FILE --testdir $TESTDIR --testspec $TESTSPEC --logdir $LOGDIR || abort_job "Error while prolog.sh file generation"
 
     if [ ! -f "$LOGDIR/prolog.sh" ]
     then
diff --git a/engine/scripts/ovgen.py b/engine/scripts/ovgen.py
index 98cdf82..7c1f05f 100755
--- a/engine/scripts/ovgen.py
+++ b/engine/scripts/ovgen.py
@@ -366,7 +366,8 @@ def parseOverrideFile(overrideFile, layer, ofcls):
 
     return classes
 
-def generateProlog(outFilePath, ofcls, classes, testdir, testspec):
+def generateProlog(logdir, ofcls, classes, testdir, testspec):
+    outFilePath = logdir + '/prolog.sh'
     outfile = open(outFilePath, "w")
 
     for ofc in classes:
@@ -402,7 +403,6 @@ def generateProlog(outFilePath, ofcls, classes, testdir, testspec):
 # generateSpec - generate shell output for the spec
 #     ts:TestSpecs  -  parsed specs for our testdir
 #     testspec: String  -   name of test spec (e.g. 'default')
-#     outFilePath - file output descriptor opened -> prolog.sh
 def generateSpec(ts, fout):
     debug_print("generating spec %s" % (ts.name))
 
@@ -470,7 +470,7 @@ def run(test_args=None):
     parser.add_argument('--ovfiles', nargs='+', metavar='OVFILE', help='list of directories containing .override files', required=True)
     parser.add_argument('--testdir', help='e.g.: Benchmark.Dhrystone', required=True)
     parser.add_argument('--testspec', nargs='+', metavar='TESTSPEC', help='testspec', required=True)
-    parser.add_argument('--output', help='output file name', required=True)
+    parser.add_argument('--logdir', help='log dir', required=True)
     parser.add_argument('--debug', help='{1,2,3} debug level (default is no debugging)', type=int, required=False)
 
     args = parser.parse_args(args=test_args)
@@ -493,10 +493,10 @@ def run(test_args=None):
         classes = classes + parseOverrideFile(ovf, layers, ofcls)
         debug_print ("parsed %s override\n------------\n" % (ovf))
 
-    generateProlog(args.output, ofcls, classes, args.testdir, args.testspec[0])
+    generateProlog(args.logdir, ofcls, classes, args.testdir, args.testspec[0])
 
 def testrun():
-    test_args =  "--debug 2 --classdir /fuego-core/engine/overlays/base/ --ovfiles /fuego-ro/boards/qemu-arm.board --testdir Benchmark.Dhrystone --testspec default --output prolog.sh".split()
+    test_args =  "--debug 2 --classdir /fuego-core/engine/overlays/base/ --ovfiles /fuego-ro/boards/qemu-arm.board --testdir Benchmark.Dhrystone --testspec default --output ./".split()
     run(test_args)
 
 run()
-- 
2.7.4


  reply	other threads:[~2018-09-04 10:01 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-04 10:01 [Fuego] Dynamic variables Daniel Sangorrin
2018-09-04 10:01 ` Daniel Sangorrin [this message]
2018-09-07 18:25   ` [Fuego] [PATCH 1/3] of: use logdir argument instead of prolog.sh Tim.Bird
2018-09-04 10:01 ` [Fuego] [PATCH 2/3] OF: create a spec.json on each run Daniel Sangorrin
2018-09-07 18:31   ` Tim.Bird
2018-09-04 10:01 ` [Fuego] [PATCH 3/3] ftc: add dynamic-vars to ftc run-test Daniel Sangorrin
2018-09-07 18:55   ` Tim.Bird
2018-10-05  1:43     ` Daniel Sangorrin
2018-10-06  1:18       ` Tim.Bird

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1536055292-34772-2-git-send-email-daniel.sangorrin@toshiba.co.jp \
    --to=daniel.sangorrin@toshiba.co.jp \
    --cc=fuego@lists.linuxfoundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.