Exemple #1
0
from xpybuild.buildcommon import enableLegacyXpybuildModuleNames
enableLegacyXpybuildModuleNames()

#
# Copyright (c) 2013 - 2017 Software AG, Darmstadt, Germany and/or its licensors
#
#   Licensed under the Apache License, Version 2.0 (the "License");
#   you may not use this file except in compliance with the License.
#   You may obtain a copy of the License at
#
#       http://www.apache.org/licenses/LICENSE-2.0
#
#   Unless required by applicable law or agreed to in writing, software
#   distributed under the License is distributed on an "AS IS" BASIS,
#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#   See the License for the specific language governing permissions and
#   limitations under the License.
#
import os
from propertysupport import *
from buildcommon import *
from pathsets import *

from targets.custom import CustomCommand

CustomCommand('${OUTPUT_DIR}/output.txt',
              [os.getenv('ComSpec', 'cmd.exe'), '/c', 'set']
              if IS_WINDOWS else ['/usr/bin/env'], [],
              env={
                  'UNSET_ENV': None,
                  'ADD_ENV': 'Foo',
Exemple #2
0
from xpybuild.buildcommon import enableLegacyXpybuildModuleNames
enableLegacyXpybuildModuleNames(
)  # having this turned on is useful - importing extra modules may give extra errors

import os, logging
from propertysupport import *
from buildcommon import *
from pathsets import *

# not used below, but make sure they're imported as they're the ones most likely to trigger unhelpful 0xYYYYY addresses in implicit input files
import targets.native
import targets.custom
import targets.java
import targets.copy

defineOutputDirProperty('OUTPUT_DIR', None)

import basetarget

defineStringProperty('MY_PROP', 'expectedval')

defineOption('testoption.default', '${MY_PROP}')
defineOption('testoption.globalOverride', 'unexpectedval')
setGlobalOption('testoption.globalOverride', 'expectedval')

defineOption('testoption.targetOverride', 'defaultval')

defineOption('testoption.legacyTargetOverride', 'defaultval')

defineOption('testoption2.empty', '')