Skip to content

Commit

Permalink
Automatic snapshot commit from tribits at cfebec9
Browse files Browse the repository at this point in the history
Origin repo remote tracking branch: 'github/master'
Origin repo remote repo URL: 'github = git@github.com:TriBITSPub/TriBITS.git'

At commit:

commit 3843b1a2a5fba9dddd41aeba82b4772a0e20e758
Author:  Roscoe A. Bartlett <rabartl@sandia.gov>
Date:    Sat Jun 24 10:04:49 2017 -0600
Summary: Add documentation and release notes for all-at-once mode (#183)
  • Loading branch information
bartlettroscoe authored and lxmota committed Jun 28, 2017
1 parent 01c38dc commit 37b4bbc
Show file tree
Hide file tree
Showing 13 changed files with 1,266 additions and 524 deletions.
24 changes: 22 additions & 2 deletions cmake/tribits/ReleaseNotes.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,29 @@
----------------------------------------
Release Notes for TriBITS
----------------------------------------

2017/06/24:

(*) MINOR: Add new all-at-once more for CTest -S driver scripts using
TRIBITS_CTEST_DRIVER() by setting the variable
${PROJECT_NAME}_CTEST_DO_ALL_AT_ONCE=TRUE. This works with older versions
of CMake/CTest and CDash but, by default, will just return a single glob
of results, not breaking results out package-by-package. Therefore, this
is disabled by default and package-by-package mode is used by default.
But if ${PROJECT_NAME}_CTEST_USE_NEW_AAO_FEATURES=TRUE is set, then
TriBITS will take advantage of new CMake, CTest, and CDash features
(currently on a branch) to display the results on CDash broken down
package-by-package. Once these changes are merged to the CMake/CTest and
CDash 'master' branches, then the default for
${PROJECT_NAME}_CTEST_USE_NEW_AAO_FEATURES will be set to TRUE
automatically when it detects an updated version of CMake/CTest is
present. In the future, at some point, the TriBITS default for
${PROJECT_NAME}_CTEST_DO_ALL_AT_ONCE will change from FALSE to TRUE since
that is a much more efficient way to drive automated testing.

2017/05/25:

(*) MINOR: PARSE_ARGUMENTS() has been depricated and replaced by
(*) MINOR: PARSE_ARGUMENTS() has been deprecated and replaced by
CMAKE_PARSE_ARGUMENTS() everywhere in TriBITS. Any call to
PARSE_ARGUMENTS() will warn users and tell them to use
CMAKE_PARSE_ARGUMENTS() instead.
Expand All @@ -21,7 +41,7 @@ Release Notes for TriBITS
<Project>_SCALE_TEST_TIMEOUT even if DART_TESTING_TIMEOUT is not
explicitly set.

2016/12/7/2016:
2016/12/07:

(*) MAJOR: The long deprecated variable
${PROJECT_NAME}_ENABLE_SECONDARY_STABLE_CODE has been removed. Upgrading
Expand Down
15 changes: 15 additions & 0 deletions cmake/tribits/ci_support/TribitsDependencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,21 @@ def getPackageNameFromPath(self, fullPath):
# packages because subpackages are listed before packages!


def getPackageNameFromTestName(self, testName):
for packageDep in self.__packagesList:
startTestName = packageDep.packageName+"_"
#print("\nstartTestName="+startTestName)
testNameStartIdx = testName.find(startTestName, 0)
if testNameStartIdx == 0:
#print("MATCH!")
if packageDep.parentPackage:
#print("Subpackage match!")
return self.getPackageByName(packageDep.parentPackage).packageName
# Else, is not a subpackage
return packageDep.packageName
return u""


def filterPackageNameList(self, inputPackagesList, keepTypesList, verbose=False):
i = 0
outputPackagesList = []
Expand Down
86 changes: 86 additions & 0 deletions cmake/tribits/ci_support/TribitsPackageTestNameUtils.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
# @HEADER
# ************************************************************************
#
# TriBITS: Tribal Build, Integrate, and Test System
# Copyright 2013 Sandia Corporation
#
# Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
# the U.S. Government retains certain rights in this software.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# 3. Neither the name of the Corporation nor the names of the
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
# ************************************************************************
# @HEADER


#
# General scripting support
#
# NOTE: Included first to check the version of python!
#

from TribitsDependencies import getProjectDependenciesFromXmlFile
from GeneralScriptSupport import *


def getPackageNameFromTestName(trilinosDependencies, testName):
return trilinosDependencies.getPackageNameFromTestName(testName)


def getTestNameFromLastTestsFailedLine(trilinosDependencies, line):
lineArray = line.split(':')
assert len(lineArray) == 2, "Error, the line '"+line+"' not formatted correctly!"
testName = lineArray[1]
assert testName != "", "Error, test name '"+testName+"' can't be empty!"
return testName


#
# Given the lines from a LastTestsFail*.log file, return an array of the
# matching parent package names.
#
# This will return the list of matching packages only once per package.
#

def getPackageNamesFromLastTestsFailedLines(trilinosDependencies, \
lastTestsFailedLines \
):
#print ("\nlastTestsFailedLine:\n"+str(lastTestsFailedLines))
packageNames = []
for lastTestsFailedLine in lastTestsFailedLines:
#print ("\nlastTestsFailedLine = '"+lastTestsFailedLine+"'")
testName = \
getTestNameFromLastTestsFailedLine(trilinosDependencies, lastTestsFailedLine)
#print ("\ntestName = '"+testName+"'")
packageName = getPackageNameFromTestName(trilinosDependencies, testName)
#print("\npackageName = '"+packageName+"'")
if findInSequence(packageNames, packageName) == -1 and packageName:
#print ("\nAppend '"+packageName+"'")
packageNames.append(packageName)
return packageNames

Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
#!/usr/bin/env python

# @HEADER
# ************************************************************************
#
# TriBITS: Tribal Build, Integrate, and Test System
# Copyright 2013 Sandia Corporation
#
# Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
# the U.S. Government retains certain rights in this software.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# 3. Neither the name of the Corporation nor the names of the
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
# ************************************************************************
# @HEADER

from TribitsPackageTestNameUtils import *


#
# Read in the commandline arguments
#

usageHelp = r"""get-tribits-packages-from-last-tests-failed.py --deps-xml-file=<file> --last-tests-failed-file=<file>
"""

from optparse import OptionParser

clp = OptionParser(usage=usageHelp)

clp.add_option(
"--deps-xml-file", dest="depsXmlFile", type="string", default=None,
help="File containing the listing of packages, dir names, dependencies, etc.")

clp.add_option(
"--last-tests-failed-file", dest="lastTestsFailedFile", type="string", default=None,
help="LastTestsFailed*.log file generated by CTest.")

(options, args) = clp.parse_args()

if not options.lastTestsFailedFile:
raise Exception("Error, the option --last-tests-failed-file=FILENAME must be set!")

trilinosDependencies = getProjectDependenciesFromXmlFile(options.depsXmlFile)

lastTestsFailedLines = readStrFromFile(options.lastTestsFailedFile).splitlines()

packageNames = getPackageNamesFromLastTestsFailedLines(trilinosDependencies,
lastTestsFailedLines)

print ';'.join(packageNames)
24 changes: 18 additions & 6 deletions cmake/tribits/core/package_arch/TribitsGlobalMacros.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -1515,26 +1515,38 @@ ENDFUNCTION()


#
# Function that prints the current set of enabled/disabled packages
# Function that prints the current set of enabled/disabled packages given
# input list of packages.
#
FUNCTION(TRIBITS_PRINT_ENABLED_PACKAGE_LIST DOCSTRING ENABLED_FLAG INCLUDE_EMPTY)
FUNCTION(TRIBITS_PRINT_ENABLED_PACKAGES_LIST_FROM_VAR PACKAGES_LIST_VAR
DOCSTRING ENABLED_FLAG INCLUDE_EMPTY
)
IF (ENABLED_FLAG AND NOT INCLUDE_EMPTY)
TRIBITS_GET_ENABLED_LIST(${PROJECT_NAME}_PACKAGES ${PROJECT_NAME}
TRIBITS_GET_ENABLED_LIST(${PACKAGES_LIST_VAR} ${PROJECT_NAME}
ENABLED_PACKAGES NUM_ENABLED)
ELSEIF (ENABLED_FLAG AND INCLUDE_EMPTY)
TRIBITS_GET_NONDISABLED_LIST(${PROJECT_NAME}_PACKAGES ${PROJECT_NAME}
TRIBITS_GET_NONDISABLED_LIST(${PACKAGES_LIST_VAR} ${PROJECT_NAME}
ENABLED_PACKAGES NUM_ENABLED)
ELSEIF (NOT ENABLED_FLAG AND NOT INCLUDE_EMPTY)
TRIBITS_GET_DISABLED_LIST(${PROJECT_NAME}_PACKAGES ${PROJECT_NAME}
TRIBITS_GET_DISABLED_LIST(${PACKAGES_LIST_VAR} ${PROJECT_NAME}
ENABLED_PACKAGES NUM_ENABLED)
ELSE() # NOT ENABLED_FLAG AND INCLUDE_EMPTY
TRIBITS_GET_NONENABLED_LIST(${PROJECT_NAME}_PACKAGES ${PROJECT_NAME}
TRIBITS_GET_NONENABLED_LIST(${PACKAGES_LIST_VAR} ${PROJECT_NAME}
ENABLED_PACKAGES NUM_ENABLED)
ENDIF()
TRIBITS_PRINT_PREFIX_STRING_AND_LIST("${DOCSTRING}" "${ENABLED_PACKAGES}")
ENDFUNCTION()


#
# Function that prints the current set of enabled/disabled packages
#
FUNCTION(TRIBITS_PRINT_ENABLED_PACKAGE_LIST DOCSTRING ENABLED_FLAG INCLUDE_EMPTY)
TRIBITS_PRINT_ENABLED_PACKAGES_LIST_FROM_VAR( ${PROJECT_NAME}_PACKAGES
"${DOCSTRING}" ${ENABLED_FLAG} ${INCLUDE_EMPTY} )
ENDFUNCTION()


#
# Function that prints the current set of enabled/disabled SE packages
#
Expand Down
5 changes: 5 additions & 0 deletions cmake/tribits/core/package_arch/TribitsPackageMacros.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,11 @@ MACRO(TRIBITS_PACKAGE_DECL PACKAGE_NAME_IN)
# Set up parent package linkage varaibles
TRIBITS_DEFINE_TARGET_VARS(${PACKAGE_NAME})

IF (${PROJECT_NAME}_CTEST_USE_NEW_AAO_FEATURES)
# Define this as a CMake/CTest "Subproject"
SET_DIRECTORY_PROPERTIES(PROPERTIES LABELS "${PACKAGE_NAME}")
ENDIF()

#
# Append the local package's cmake directory in order to help pull in
# configure-time testing macros
Expand Down
13 changes: 12 additions & 1 deletion cmake/tribits/core/utils/NinjaMakefileCommon.make
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,15 @@ endif

STANDARD_TARGETS := install test package package_source edit_cache rebuild_cache

BUILD_OBJ := "^build $(SUBDIR)/CMakeFiles/\([^:]*\.o\):.*"
OBJECTS := $(shell sed -n "\|"$(BUILD_OBJ)"| {s|"$(BUILD_OBJ)"|CMakeFiles/\1|;p}" $(TOPDIR)/build.ninja)

all $(STANDARD_TARGETS):
$(NINJA) -C $(TOPDIR) $(NINJA_FLAGS) $(SUBDIR)/$@
$(TARGETS):
$(NINJA) -C $(TOPDIR) $(NINJA_FLAGS) $@
$(OBJECTS):
$(NINJA) -C $(TOPDIR) $(NINJA_FLAGS) $(SUBDIR)/$@
clean:
$(NINJA) -C $(TOPDIR) $(NINJA_FLAGS) -t clean $(SUBDIR)/all
help:
Expand All @@ -27,5 +32,11 @@ help:
@echo "and the following project targets:"
@echo ""
@for t in $(sort $(TARGETS)); do echo " $$t"; done
@echo ""
@echo "Run 'make help-objects' to list object files."
help-objects:
@echo "This Makefile supports the following object files:"
@echo ""
@for t in $(sort $(OBJECTS)); do echo " $$t"; done

.PHONY: all clean help $(STANDARD_TARGETS) $(TARGETS)
.PHONY: all clean help help-objects $(STANDARD_TARGETS) $(TARGETS) $(OBJECTS)
Loading

0 comments on commit 37b4bbc

Please sign in to comment.