public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Anton Mikanovich <amikan@ilbers.de>
To: isar-users@googlegroups.com
Cc: Anton Mikanovich <amikan@ilbers.de>
Subject: [PATCH v3 04/11] vm_boot_test: Fix log file path in vm_boot_test
Date: Wed, 17 Mar 2021 17:52:18 +0300	[thread overview]
Message-ID: <20210317145225.88050-5-amikan@ilbers.de> (raw)
In-Reply-To: <20210317145225.88050-1-amikan@ilbers.de>

Make log filename random and store it in build folder.

Signed-off-by: Anton Mikanovich <amikan@ilbers.de>
---
 testsuite/vm_boot_test/vm_boot_test.py | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/testsuite/vm_boot_test/vm_boot_test.py b/testsuite/vm_boot_test/vm_boot_test.py
index f1b7b1f..c937a16 100644
--- a/testsuite/vm_boot_test/vm_boot_test.py
+++ b/testsuite/vm_boot_test/vm_boot_test.py
@@ -4,6 +4,7 @@ import os
 import subprocess32
 import sys
 import time
+import tempfile
 
 from os.path import dirname
 sys.path.append(dirname(__file__) + '/..')
@@ -26,9 +27,9 @@ class VmBootTest(Test):
         self.log.info('Isar build folder is: ' + build_dir)
         self.log.info('===================================================')
 
-        output_file = '/tmp/vm_boot_test.log'
-        if os.path.exists(output_file):
-            os.remove(output_file)
+        fd, output_file = tempfile.mkstemp(suffix='_log.txt',
+                                           prefix='vm_start_' + distro + '_' +
+                                           arch + '_', dir=build_dir, text=True)
 
         cmdline = start_vm.format_qemu_cmdline(arch, build_dir, distro,
                                                None, None)
-- 
2.25.1


  parent reply	other threads:[~2021-03-17 14:53 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-17 14:52 [PATCH v3 00/11] Update Avocado testsuite Anton Mikanovich
2021-03-17 14:52 ` [PATCH v3 01/11] start_vm.py: Fix target name handling Anton Mikanovich
2021-03-17 14:52 ` [PATCH v3 02/11] start_vm.py: Add output and PID file vm_start.py options Anton Mikanovich
2021-03-17 14:52 ` [PATCH v3 03/11] start_vm.py: Add MIPS support Anton Mikanovich
2021-03-17 14:52 ` Anton Mikanovich [this message]
2021-03-17 14:52 ` [PATCH v3 05/11] vm_boot_test: Remove external varianter Anton Mikanovich
2021-03-17 14:52 ` [PATCH v3 06/11] vm_boot_test: Improve QEMU images checking Anton Mikanovich
2021-03-17 14:52 ` [PATCH v3 07/11] build_test: Refactoring build tests cases Anton Mikanovich
2021-03-17 14:52 ` [PATCH v3 08/11] testsuite: Add Python generations for testsuite in gitignore Anton Mikanovich
2021-03-17 14:52 ` [PATCH v3 09/11] testsuite: Fix test suite prepare guide Anton Mikanovich
2021-03-17 14:52 ` [PATCH v3 10/11] ci_build: Migrate to Avocado Anton Mikanovich
2021-03-17 14:56   ` Jan Kiszka
2021-03-17 17:26     ` Anton Mikanovich
2021-03-17 17:36       ` Jan Kiszka
2021-03-17 14:52 ` [PATCH v3 11/11] vm_smoke_test: " Anton Mikanovich

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=20210317145225.88050-5-amikan@ilbers.de \
    --to=amikan@ilbers.de \
    --cc=isar-users@googlegroups.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox