blob: ca734028b128141daa339d53c124beaac32a3c8d [file] [log] [blame]
Matteo Scandolod2044a42017-08-07 16:08:28 -07001
2# Copyright 2017-present Open Networking Foundation
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15
16
Matteo Scandolo67654fa2017-06-09 09:33:17 -070017import os
18
19# Constants
20OUTPUT_DIR = os.path.abspath(os.path.dirname(os.path.realpath(__file__)) + "/out/")
21
22TMP_TARGET_PATH = os.path.join(OUTPUT_DIR, 'tmp.xtarget')
23
24# Store in this class the args to pass at the generator
25class FakeArgs:
Scott Bakerc237f882018-09-28 14:12:47 -070026 verbosity=0
Matteo Scandolo67654fa2017-06-09 09:33:17 -070027 pass
28
29class XProtoTestHelpers:
30
31 @staticmethod
32 def write_tmp_target(target):
33 tmp_file = open(TMP_TARGET_PATH, 'w')
34 tmp_file.write(target)
35 tmp_file.close()
36 return TMP_TARGET_PATH
37