• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright 2020 The Chromium OS Authors. All rights reserved.
2# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4
5import logging
6import os
7
8from autotest_lib.client.common_lib import error
9from autotest_lib.server import test
10
11class dummy_SynchronousOffloadServer(test.test):
12  version = 1
13
14  def run_once(self):
15    DIR = os.getenv('SYNCHRONOUS_OFFLOAD_DIR', "")
16    if DIR == "":
17      raise error.TestFail("Did not find value for SYNCHRONOUS_OFFLOAD_DIR")
18    if not os.path.isdir(DIR):
19      raise error.TestFail("$SYNCHRONOUS_OFFLOAD_DIR=%s, which is not "
20                           "a valid directory." % DIR)
21    logging.debug("Writing to directory %s", DIR)
22    with open(os.path.join(DIR,"test_file"), "w") as f:
23      f.write("Test string which should be offloaded")
24      logging.debug("Wrote string to test file.")
25