text:
// Code generated by go-swagger; DO NOT EDIT.

package models

// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command

import (
	"context"
	"encoding/json"

	"github.com/go-openapi/errors"
	"github.com/go-openapi/strfmt"
	"github.com/go-openapi/validate"
)

// CatalogItemProductType The type of a CatalogItem. Connect V2 only allows the creation of `REGULAR` or `APPOINTMENTS_SERVICE` items.
//
// swagger:model CatalogItemProductType
type CatalogItemProductType string

const (

	// CatalogItemProductTypeREGULAR captures enum value "REGULAR"
	CatalogItemProductTypeREGULAR CatalogItemProductType = "REGULAR"

	// CatalogItemProductTypeGIFTCARD captures enum value "GIFT_CARD"
	CatalogItemProductTypeGIFTCARD CatalogItemProductType = "GIFT_CARD"

	// CatalogItemProductTypeAPPOINTMENTSSERVICE captures enum value "APPOINTMENTS_SERVICE"
	CatalogItemProductTypeAPPOINTMENTSSERVICE CatalogItemProductType = "APPOINTMENTS_SERVICE"
)

// for schema
var catalogItemProductTypeEnum []interface{}

func init() {
	var res []CatalogItemProductType
	if err := json.Unmarshal([]byte(`["REGULAR","GIFT_CARD","APPOINTMENTS_SERVICE"]`), &res); err != nil {
		panic(err)
	}
	for _, v := range res {
		catalogItemProductTypeEnum = append(catalogItemProductTypeEnum, v)
	}
}

func (m CatalogItemProductType) validateCatalogItemProductTypeEnum(path, location string, value CatalogItemProductType) error {
	if err := validate.EnumCase(path, location, value, catalogItemProductTypeEnum, true); err != nil {
		return err
	}
	return nil
}

// Validate validates this catalog item product type
func (m CatalogItemProductType) Validate(formats strfmt.Registry) error {
	var res []error

	// value enum
	if err := m.validateCatalogItemProductTypeEnum("", "body", m); err != nil {
		return err
	}

	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}

// ContextValidate validates this catalog item product type based on context it is used
func (m CatalogItemProductType) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
	return nil
}


text:
package coveragecalculator

// FieldCoverage represents coverage data for a field.
type FieldCoverage struct {
	Field string `json:"Field"`
	Values []string `json:"Values"`
	Coverage bool `json:"Covered"`
}

// Merge operation merges the field coverage data when multiple nodes represent the same type. (e.g. ConnectedNodes traversal)
func (f *FieldCoverage) Merge(coverage bool, values []string) {
	if coverage {
		f.Coverage = coverage
		f.Values = append(f.Values, values...)
	}
}

// TypeCoverage encapsulates type information and field coverage.
type TypeCoverage struct {
	Package string `json:"Package"`
	Type string `json:"Type"`
	Fields map[string]*FieldCoverage `json:"Fields"`
}

repository: matzew/test-infra

license_type: permissive

repo_name: matzew/test-infra

branch_name: refs/heads/master

extension: go


text:
@misc{projectslide,
  title={Project Related Discussion},
  author={Oancea, Cosmin E.},
  year={2015}
}

license: MIT

extension: bib


text:
@inproceedings{oliveira2017strategies,
 abstract = {In the last years, different approaches have been proposed to introduce semantic information to genetic programming. In particular, the geometric semantic genetic programming (GSGP) and the interesting properties of its evolutionary operators have gotten the attention of the community. This paper is interested in the use of GSGP to solve symbolic regression problems, where semantics is defined by the output set generated by a given individual when applied to the training cases. In this scenario, both mutation and crossover operators defined with fitness function based on Manhattan distance use randomly built functions to generate offspring. However, the outputs of these random functions are not guaranteed to be uniformly distributed in the semantic space, as the functions are generated considering the syntactic space. We hypothesize that the non-uniformity of the semantics of these functions may bias the search, and propose three different standard normalization techniques to improve the distribution of the outputs of these random functions over the semantic space. The results are compared with a popular strategy that uses a logistic function as a wrapper to the outputs, and show that the strategies tested can improve the results of the previous method. The experimental analysis also indicates that a more uniform distribution of the semantics of these functions does not necessarily imply in better results in terms of test error.},
 address = {Cham},
 author = {Oliveira, Luiz Otavio V. B. and Casadei, Felipe and Pappa, Gisele L.},
 booktitle = {Genetic Programming: 20th European Conference, EuroGP 2017, Amsterdam, The Netherlands, April 19-21, 2017, Proceedings},
 doi = {10.1007/978-3-319-55696-3_11},
 editor = {McDermott, James and Castelli, Mauro and Sekanina, Lukas and Haasdijk, Evert and García-Sánchez, Pablo},
 file = {Strategies for Improving the Distribution of Random Function Outputs in GSGP.pdf:Artigos/my-publications/Strategies for Improving the Distribution of Random Function Outputs in GSGP.pdf:PDF},
 isbn = {978-3-319-55696-3},
 owner = {luiz},
 pages = {164--177},
 publisher = {Springer International Publishing},
 timestamp = {2017.02.09},
 title = {Strategies for Improving the Distribution of Random Function Outputs in GSGP},
 url = {https://link.springer.com/chapter/10.1007/978-3-319-55696-3_11},
 year = {2017}
}

repository: luizvbo/academic-kickstart

repo_name: luizvbo/academic-kickstart

gha_license_id: MIT


text:
package torsvc

import (
	"net"
)

// Net is an interface housing a Dial function and several DNS functions, to
// abstract the implementation of these functions over both Regular and Tor
type Net interface {
	// Dial accepts a network and address and returns a connection to a remote
	// peer.
	Dial(string, string) (net.Conn, error)

	// LookupHost performs DNS resolution on a given hostname and returns
	// addresses of that hostname
	LookupHost(string) ([]string, error)

	// LookupSRV allows a service and network to be specified and makes queries
	// to a given DNS server for SRV queries.
	LookupSRV(string, string, string) (string, []*net.SRV, error)

	// ResolveTCPAddr is a used to resolve publicly advertised TCP addresses.
	ResolveTCPAddr(string, string) (*net.TCPAddr, error)
}

repository: jimmysong/lnd

repo_name: jimmysong/lnd


text:
DESCRIPTION="A upower based battery monitor for the system tray, similar to batterymon"
HOMEPAGE="http://code.google.com/p/batti-gtk/"
SECTION = "x11/network"
PR = "r0.4"

LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"

DEPENDS = "libnotify"
RDEPENDS = "hicolor-icon-theme upower python-pygtk python-dbus"

SRC_URI="http://batti-gtk.googlecode.com/files/${P}.tar.gz"
SRC_URI[md5sum] = "4b239ead1643c95a6d89c380bc167781"
SRC_URI[sha256sum] = "a63f99bc63dad743abef18ac666e11247011cf9136a11286b131467d9f484d1c"

inherit gtk-icon-cache distutils

FILES_${PN} += " ${datadir}/icons/hicolor/* ${datadir}/applications/${PN}.desktop"

repository: tworaz/oe-tworaz

repo_name: tworaz/oe-tworaz

gha_language: Shell

extension: bb


text:
package csn

import (
	"errors"
	"fmt"
)

var (
	ErrInvalidNetwork = errors.New("Invalid/not supported net flag given")
)

func errInvalidNetwork(nType string) error {
	return fmt.Errorf("%s: %s", ErrInvalidNetwork, nType)
}

repository: mit-dci/utreexo

repo_name: mit-dci/utreexo

gha_language: Go


text:
## Sets up python for hoomd

# macro for running python and getting output
macro(run_python code result)
execute_process(
    COMMAND
    ${PYTHON_EXECUTABLE} -c ${code}
    OUTPUT_VARIABLE ${result}
    RESULT_VARIABLE PY_ERR
    OUTPUT_STRIP_TRAILING_WHITESPACE
    )

if(PY_ERR)
    message(STATUS "Error while querying python for information")
endif(PY_ERR)
endmacro(run_python)

# find the python interpreter, first
find_program(PYTHON_EXECUTABLE NAMES python3 python)
find_package(PythonInterp REQUIRED)

# get the python installation prefix and version
run_python("import sys\; print('%d' % (sys.version_info[0]))" PYTHON_VERSION_MAJOR)
run_python("import sys\; print('%d' % (sys.version_info[1]))" PYTHON_VERSION_MINOR)
set(PYTHON_VERSION "${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}")
string(REPLACE "." "" _python_version_no_dots ${PYTHON_VERSION})

# determine the include directory
if (PYTHON_VERSION VERSION_GREATER 3)
    run_python("import sysconfig\; print(sysconfig.get_path('include'))" _python_include_hint)
    run_python("import sysconfig\; print(sysconfig.get_config_var('LIBDIR'))" _python_lib_hint)
    run_python("import sysconfig\; print(sysconfig.get_config_var('LDLIBRARY'))" _python_dynamic_lib_name)
else()
    run_python("from distutils import sysconfig\; print sysconfig.get_python_inc()" _python_include_hint)
    run_python("from distutils import sysconfig\; print sysconfig.PREFIX" _python_prefix_hint)
    run_python("from distutils import sysconfig\; print sysconfig.get_config_var('LIBPL')" _python_static_hint)
    run_python("from distutils import sysconfig\; print sysconfig.get_config_var('LIBRARY')" _python_static_lib_name)
    run_python("from distutils import sysconfig\; print sysconfig.get_config_var('LDLIBRARY')" _python_dynamic_lib_name)
endif()

# determine the user site dir
run_python("import site\; print(site.USER_SITE)" PYTHON_USER_SITE)

# always link the dynamic python library
get_filename_component(_python_lib_first ${_python_dynamic_lib_name} NAME)

find_path(PYTHON_INCLUDE_DIR Python.h
          HINTS ${_python_include_hint}
          NO_DEFAULT_PATH)

# add a blank suffix to the beginning to find the Python framework
set(_old_suffixes ${CMAKE_FIND_LIBRARY_SUFFIXES})
set(CMAKE_FIND_LIBRARY_SUFFIXES ";${CMAKE_FIND_LIBRARY_SUFFIXES}")
find_library(PYTHON_LIBRARY
             NAMES ${_python_lib_first} python${_python_version_no_dots} python${PYTHON_VERSION}
             HINTS ${_python_prefix_hint} ${_python_static_hint} ${_python_lib_hint}
             PATH_SUFFIXES lib64 lib libs
             NO_DEFAULT_PATH
             )
set(${CMAKE_FIND_LIBRARY_SUFFIXES} _old_suffixes)

MARK_AS_ADVANCED(
  PYTHON_LIBRARY
  PYTHON_INCLUDE_DIR
  BOOST_PYTHON_COMPONENT
)

SET(PYTHON_INCLUDE_DIRS "${PYTHON_INCLUDE_DIR}")
SET(PYTHON_LIBRARIES "${PYTHON_LIBRARY}")

INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(PythonLibs DEFAULT_MSG PYTHON_LIBRARIES PYTHON_INCLUDE_DIRS)

repository: harperic/freud

repo_name: harperic/freud

extension: cmake


text:
SUMMARY = "ID Button pressed application"
PR = "r1"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://${IBMBASE}/COPYING.apache-2.0;md5=34400b68072d710fecd0a2940a0d1658"

inherit obmc-phosphor-systemd

DEPENDS += "virtual/obmc-gpio-monitor"
RDEPENDS_${PN} += "virtual/obmc-gpio-monitor"

S = "${WORKDIR}"
SRC_URI += " \
        file://toggle_identify_led.sh \
        file://99-gpio-keys.rules \
        "

do_install() {
        install -d ${D}${bindir}
        install -m 0755 ${WORKDIR}/toggle_identify_led.sh \
            ${D}${bindir}/toggle_identify_led.sh
        install -d ${D}${base_libdir}/udev/rules.d/
        install ${WORKDIR}/99-gpio-keys.rules ${D}${base_libdir}/udev/rules.d/
}

SYSTEMD_ENVIRONMENT_FILE_${PN} +="obmc/gpio/id_button"

SYSTEMD_SERVICE_${PN} += "id-button-pressed.service"

repository: joseph-reynolds/openbmc

repo_name: joseph-reynolds/openbmc

gha_license_id: NOASSERTION


text:
package group

import (
	"reflect"
	"testing"

	"github.com/mosaicnetworks/babble/src/peers"
)

// Test inserting and updating a single group.
func TestSetGroup(t *testing.T) {
	repo := NewInmemGroupRepository()

	group := NewGroup(
		"",
		"TestGroup",
		"TestApp",
		[]*peers.Peer{
			peers.NewPeer("pub1", "net1", "peer1"),
		},
	)

	var time int64 = 0

	// Insert new group, verify that it can be retrieved and that the LastUpdate
	// time was updated

	groupID, err := repo.SetGroup(group)
	if err != nil {
		t.Fatal(err)
	}

	retrievedGroup, err := repo.GetGroup(groupID)
	if err != nil {
		t.Fatal(err)
	}

	if !reflect.DeepEqual(group, retrievedGroup) {
		t.Fatalf("Retrieved group should be %#v, not %#v", group, retrievedGroup)
	}

	if retrievedGroup.LastUpdated < time {
		t.Fatalf("group LastUpdated should have increased")
	}

	// Update the group and verify that its LastUpdate time has been updated

	time = retrievedGroup.LastUpdated

	// Add a peer
	group.Peers = append(group.Peers, peers.NewPeer("pub2", "net2", "peer2"))

	_, err = repo.SetGroup(group)
	if err != nil {
		t.Fatal(err)
	}

	retrievedGroup2, err := repo.GetGroup(groupID)
	if err != nil {
		t.Fatal(err)
	}

	if !reflect.DeepEqual(group, retrievedGroup2) {
		t.Fatalf("Retrieved group should be %#v, not %#v", group, retrievedGroup2)
	}

	if retrievedGroup2.LastUpdated < time {
		t.Fatalf("group LastUpdated should have increased")
	}
}

func TestDeleteGroup(t *testing.T) {
	repo := NewInmemGroupRepository()

	group := NewGroup(
		"",
		"TestGroup",
		"TestApp",
		[]*peers.Peer{
			peers.NewPeer("pub1", "net1", "peer1"),
		},
	)

	groupID, err := repo.SetGroup(group)
	if err != nil {
		t.Fatal(err)
	}

	err = repo.DeleteGroup(groupID)
	if err != nil {
		t.Fatal(err)
	}

	retrievedGroup, err := repo.GetGroup(groupID)
	if retrievedGroup != nil || err == nil {
		t.Fatalf("Retrieving deleted group should be return nil and error")
	}
}

// Test inserting groups with different AppIDs and fetching all groups or groups
// by AppID.
func TestGetGroups(t *testing.T) {
	repo := NewInmemGroupRepository()

	group1 := NewGroup(
		"",
		"TestGroup1",
		"TestApp1",
		[]*peers.Peer{
			peers.NewPeer("pub1", "net1", "peer1"),
		},
	)

	group2 := NewGroup(
		"",
		"TestGroup2",
		"TestApp2",
		[]*peers.Peer{
			peers.NewPeer("pub1", "net1", "peer1"),
		},
	)

	_, err := repo.SetGroup(group1)
	if err != nil {
		t.Fatal(err)
	}

	_, err = repo.SetGroup((group2))
	if err != nil {
		t.Fatal(err)
	}

	allGroups, err := repo.GetAllGroups()
	if err != nil {
		t.Fatal(err)
	}

	if len(allGroups) != 2 {
		t.Fatalf("Repo should contain 2 groups, not %d", len(allGroups))
	}

	app1Groups, err := repo.GetAllGroupsByAppID("TestApp1")
	if err != nil {
		t.Fatal(err)
	}

	if len(app1Groups) != 1 {
		t.Fatalf("App1 should contain 1 group, not %d", len(app1Groups))
	}

	app2Groups, err := repo.GetAllGroupsByAppID("TestApp2")
	if err != nil {
		t.Fatal(err)
	}

	if len(app2Groups) != 1 {
		t.Fatalf("App2 should contain 1 group, not %d", len(app2Groups))
	}
}

repository: arrivets/disco

repo_name: arrivets/disco


text:
@Article{chen2016tree,
  title = {Tree of life for the genera of Chinese vascular plants},
  author = {Zhi-Duan Chen and Tuo Yang and Li Lin and Li-Min Lu and Hong-Lei Li and Miao Sun and Bing Liu and Min Chen and Yan-Ting Niu and Jian-Fei Ye and {others}},
  journal = {Journal of Systematics and Evolution},
  volume = {54},
  number = {4},
  pages = {277--306},
  year = {2016},
}

repository: Cactusolo/CactusOasis

repo_name: Cactusolo/CactusOasis

branch_name: refs/heads/main


text:
#======================================#
#           SUMMARY/LICENCE            #
#--------------------------------------#
SUMMARY = "Key/value database library with extensible hashing"
HOMEPAGE = "http://www.gnu.org/software/gdbm/"

LICENSE = "GPLv3"
LIC_FILES_CHKSUM = "file://COPYING;md5=241da1b9fe42e642cbb2c24d5e0c4d24"

#======================================#
#           REQUIRE/INHERIT            #
#--------------------------------------#
inherit autotools gettext texinfo lib_package

#======================================#
#                SOURCE                #
#--------------------------------------#
SRC_URI = "${GNU_MIRROR}/gdbm/gdbm-${PV}.tar.gz;name=source"

SRC_URI[source.md5sum] = "9ce96ff4c99e74295ea19040931c8fb9"
SRC_URI[source.sha256sum] = "d97b2166ee867fd6ca5c022efee80702d6f30dd66af0e03ed092285c3af9bcea"

#======================================#
#           DEPENDS/PROVIDES           #
#--------------------------------------#

#======================================#
#         BUILD CONFIGURATIONS         #
#--------------------------------------#
# Needed for dbm python module
EXTRA_OECONF = "-enable-libgdbm-compat"

# Stop presence of dbm/nbdm on the host contaminating builds
CACHED_CONFIGUREVARS_append = " ac_cv_lib_ndbm_main=no ac_cv_lib_dbm_main=no "

#======================================#
#                TASKS                 #
#--------------------------------------#
do_install_append () {
    # Create a symlink to ndbm.h and gdbm.h in include/gdbm to let other packages to find
    # these headers
    install -d ${D}${includedir}/gdbm
    ln -sf ../ndbm.h ${D}/${includedir}/gdbm/ndbm.h
    ln -sf ../gdbm.h ${D}/${includedir}/gdbm/gdbm.h
}

#======================================#
#            PACKAGES/FILES            #
#--------------------------------------#
PACKAGES_prepend = " ${PN}-compat "
FILES_${PN}-compat = "${libdir}/libgdbm_compat${SOLIBS}"

#======================================#
#            INSTALL SCRIPT            #
#--------------------------------------#

#======================================#
#             ALTERNATIVES             #
#--------------------------------------#

#======================================#
#           USERADD/SYSTEMD            #
#--------------------------------------#

#======================================#
#                 TEST                 #
#--------------------------------------#


text:
package shop

import (
	"net/url"

	"github.com/bububa/opentaobao/model"
)

// TaobaoShopSellerGetAPIRequest 卖家店铺基础信息查询 API请求
// taobao.shop.seller.get
//
// 获取卖家店铺的基本信息
type TaobaoShopSellerGetAPIRequest struct {
	model.Params
	// 需返回的字段列表。可选值：Shop 结构中的所有字段；多个字段之间用逗号(,)分隔
	_fields string
}

// NewTaobaoShopSellerGetRequest 初始化TaobaoShopSellerGetAPIRequest对象
func NewTaobaoShopSellerGetRequest() *TaobaoShopSellerGetAPIRequest {
	return &TaobaoShopSellerGetAPIRequest{
		Params: model.NewParams(),
	}
}

// GetApiMethodName IRequest interface 方法, 获取Api method
func (r TaobaoShopSellerGetAPIRequest) GetApiMethodName() string {
	return "taobao.shop.seller.get"
}

// GetApiParams IRequest interface 方法, 获取API参数
func (r TaobaoShopSellerGetAPIRequest) GetApiParams(params url.Values) {
	for k, v := range r.Params {
		params.Set(k, v.String())
	}
}

// GetRawParams IRequest interface 方法, 获取API原始参数
func (r TaobaoShopSellerGetAPIRequest) GetRawParams() model.Params {
	return r.Params
}

// SetFields is Fields Setter
// 需返回的字段列表。可选值：Shop 结构中的所有字段；多个字段之间用逗号(,)分隔
func (r *TaobaoShopSellerGetAPIRequest) SetFields(_fields string) error {
	r._fields = _fields
	r.Set("fields", _fields)
	return nil
}

// GetFields Fields Getter
func (r TaobaoShopSellerGetAPIRequest) GetFields() string {
	return r._fields
}

repository: bububa/opentaobao

repo_name: bububa/opentaobao


text:
// (c) 2021, Ava Labs, Inc. All rights reserved.
// See the file LICENSE for licensing terms.

package main

import (
	"fmt"
	"log"
	"os"
	"syscall"

	appPlugin "github.com/ava-labs/avalanchego/main/plugin"
	"github.com/ava-labs/avalanchego/main/process"
	"github.com/ava-labs/avalanchego/utils"
	"github.com/ava-labs/avalanchego/utils/logging"
	"github.com/ava-labs/avalanchego/utils/perms"
	"github.com/hashicorp/go-hclog"
	"github.com/hashicorp/go-plugin"
)

const (
	header = "" +
		`     _____               .__                       .__` + "\n" +
		`    /  _  \___  _______  |  | _____    ____   ____ |  |__   ____    ,_ o` + "\n" +
		`   /  /_\  \  \/ /\__  \ |  | \__  \  /    \_/ ___\|  |  \_/ __ \   / //\,` + "\n" +
		`  /    |    \   /  / __ \|  |__/ __ \|   |  \  \___|   Y  \  ___/    \>> |` + "\n" +
		`  \____|__  /\_/  (____  /____(____  /___|  /\___  >___|  /\___  >    \\` + "\n" +
		`          \/           \/          \/     \/     \/     \/     \/`
)

// main is the primary entry point to Avalanche.
func main() {
	// parse config using viper
	if err := parseViper(); err != nil {
		// Returns exit code 1
		log.Fatalf("parsing parameters returned with error %s", err)
	}

	// Set the data directory permissions to be read write.
	if err := perms.ChmodR(defaultDataDir, true, perms.ReadWriteExecute); err != nil {
		log.Fatalf("failed to restrict the permissions of the data directory with error %s", err)
	}

	c := Config
	// Create the logger
	logFactory := logging.NewFactory(c.LoggingConfig)

	log, err := logFactory.Make()
	if err != nil {
		logFactory.Close()
		fmt.Printf("starting logger failed with: %s\n", err)
		os.Exit(1)
	}

	app := process.NewApp(c, logFactory, log)
	if c.PluginMode {
		plugin.Serve(&plugin.ServeConfig{
			HandshakeConfig: appPlugin.Handshake,
			Plugins: map[string]plugin.Plugin{
				"nodeProcess": appPlugin.New(app),
			},
			// A non-nil value here enables gRPC serving for this plugin
			GRPCServer: plugin.DefaultGRPCServer,
			Logger: hclog.New(&hclog.LoggerOptions{
				Level: hclog.Error,
			}),
		})
		return
	}

	fmt.Println(header)

	// If we get a a SIGINT or SIGTERM, tell the node to stop.
	// If [app.Start()] has been called, it will return.
	// If not, then when [app.Start()] is called below, it will immediately return 1.
	_ = utils.HandleSignals(
		func(os.Signal) {
			app.Stop()
		},
		syscall.SIGINT, syscall.SIGTERM,
	)
	// Start the node
	exitCode := app.Start()

	logFactory.Close()
	os.Exit(exitCode)
}

repository: ahenaopay/avalanchego

repo_name: ahenaopay/avalanchego


text:
SUMMARY =  "Kernel driver for IVSHMEM based UIO driver"
DESCRIPTION = "Kernel module which registers a UIO (userspace io) device for inter VM shared memory"
HOMEPAGE = "https://github.com/henning-schild-work/ivshmem-guest-code"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=0546a27aad86c83b75ad4ee6133e9d5e"

inherit module

RDEPENDS_${PN} = "jailhouse"

PROTOCOL = "git"
BRANCH = "jailhouse"
SRCREV = "f3ad79881bebb6c6068966ee3d265d8034c20492"
SRC_URI = "git://github.com/henning-schild-work/ivshmem-guest-code.git;protocol=${PROTOCOL};branch=${BRANCH}"

S = "${WORKDIR}/git"

EXTRA_OEMAKE += 'KDIR="${STAGING_KERNEL_DIR}"'

COMPATIBLE_MACHINE = "(ti-soc)"

do_compile_prepend() {
    cd ${S}/kernel_module/uio
}

do_install() {
    install -d ${D}/${base_libdir}/modules/${KERNEL_VERSION}/extra
    install -m 644 ${S}/kernel_module/uio/uio_ivshmem.ko ${D}/${base_libdir}/modules/${KERNEL_VERSION}/extra
}

repository: bjornwilliam/meta-ti

repo_name: bjornwilliam/meta-ti


text:
//>>built
define({findLabel:"\u041d\u0430\u043c\u0435\u0440\u0438:",findTooltip:"\u0412\u044a\u0432\u0435\u0434\u0438 \u0442\u0435\u043a\u0441\u0442 \u0437\u0430 \u0442\u044a\u0440\u0441\u0435\u043d\u0435",replaceLabel:"\u041f\u043e\u0434\u043c\u0435\u043d\u0438 \u0441:",replaceTooltip:"\u0412\u044a\u0432\u0435\u0434\u0435\u0442\u0435 \u0442\u0435\u043a\u0441\u0442, \u043a\u043e\u0439\u0442\u043e \u0434\u0430 \u0431\u044a\u0434\u0435 \u043f\u043e\u0434\u043c\u0435\u043d\u0435\u043d \u0441",findReplace:"\u041d\u0430\u043c\u0435\u0440\u0438 \u0438 \u043f\u043e\u0434\u043c\u0435\u043d\u0438",
matchCase:"\u0421 \u043c\u0430\u043b\u043a\u0438 \u0438 \u0433\u043b\u0430\u0432\u043d\u0438 \u0431\u0443\u043a\u0432\u0438",matchCaseTooltip:"\u0421 \u043c\u0430\u043b\u043a\u0438 \u0438 \u0433\u043b\u0430\u0432\u043d\u0438 \u0431\u0443\u043a\u0432\u0438",backwards:"\u041e\u0431\u0440\u0430\u0442\u043d\u043e",backwardsTooltip:"\u041e\u0431\u0440\u0430\u0442\u043d\u043e \u0442\u044a\u0440\u0441\u0435\u043d\u0435 \u0437\u0430 \u0442\u0435\u043a\u0441\u0442",replaceAllButton:"\u041f\u043e\u0434\u043c\u0435\u043d\u0438 \u0432\u0441\u0438\u0447\u043a\u0438",
replaceAllButtonTooltip:"\u041f\u043e\u0434\u043c\u0435\u043d\u0438 \u0446\u0435\u043b\u0438\u044f \u0442\u0435\u043a\u0441\u0442",findButton:"\u041d\u0430\u043c\u0435\u0440\u0438",findButtonTooltip:"\u041d\u0430\u043c\u0435\u0440\u0438 \u0442\u0435\u043a\u0441\u0442\u0430",replaceButton:"\u041f\u043e\u0434\u043c\u0435\u043d\u0438",replaceButtonTooltip:"\u041f\u043e\u0434\u043c\u0435\u043d\u0438 \u0442\u0435\u043a\u0441\u0442\u0430",replaceDialogText:"\u041f\u043e\u0434\u043c\u0435\u043d\u0435\u043d\u0438 ${0} \u043f\u0440\u043e\u044f\u0432\u0438.",
eofDialogText:"\u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0430 \u043f\u0440\u043e\u044f\u0432\u0430 ${0}",eofDialogTextFind:"\u043d\u0430\u043c\u0435\u0440\u0435\u043d\u0438",eofDialogTextReplace:"\u043f\u043e\u0434\u043c\u0435\u043d\u0435\u043d\u0438"});

repository: ycabon/presentations

repo_name: ycabon/presentations

branch_name: refs/heads/gh-pages

gha_language: JavaScript

extension: js


text:
DESCRIPTION = "Qualcomm primary bootloader binary blobs for Dragonboard"
LICENSE = "Proprietary"
LIC_FILES_CHKSUM = "file://LICENSE;md5=4d087ee0965cb059f1b2f9429e166f64"

SRC_URI = "https://releases.linaro.org/96boards/dragonboard410c/linaro/rescue/${PV}/dragonboard410c_bootloader_emmc_linux-88.zip \
	   file://emmc-partitions.txt"
SRC_URI[md5sum] = "ac646bc6f18408f84af09672a41e2714"
SRC_URI[sha256sum] = "7337c403a1e9b85592f662180a3a4caacc68f0a945cdb30de3394d148bb66cf5"

COMPATIBLE_MACHINE = "(apq8016)"

PACKAGE_ARCH = "${MACHINE_ARCH}"

S = "${WORKDIR}"
B = "${S}"

INHIBIT_DEFAULT_DEPS = "1"
DEPENDS = ""

do_configure() {
    :
}
do_compile() {
    :
}
do_install() {
    install -d ${D}${libdir}/${PN}
    for f in sbc_1.0_8016.bin hyp.mbn rpm.mbn tz.mbn sbl1.mbn LICENSE; do
	install -m 0644 $f ${D}${libdir}/${PN}/
    done
    install -m 0644 emmc-partitions.txt ${D}${libdir}/${PN}/partitions.txt
}

PACKAGES = "${PN}-dev ${PN}"
FILES_${PN}-dev = "${libdir}/${PN}"
INSANE_SKIP_${PN}-dev = "arch"
ALLOW_EMPTY_${PN} = "1"
INHIBIT_PACKAGE_STRIP = "1"
INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
INHIBIT_SYSROOT_STRIP = "1"

repository: a-zakirov/meta-qcom

repo_name: a-zakirov/meta-qcom


text:
SUMMARY = "A console-only image with a development/debug \
environment suitable for building GNURadio out of tree blocks installed."

EXTRA_IMAGE_FEATURES += "tools-debug tools-profile tools-sdk dev-pkgs dbg-pkgs\
                  "
LICENSE = "MIT"

EXTRA_IMAGE_FEATURES_remove_ettus-e1xx = "tools-profile"

require recipes-images/images/native-sdk.inc
require recipes-images/images/gnuradio-image.bb

CORE_IMAGE_EXTRA_INSTALL += "\
    packagegroup-sdr-gnuradio-extended \
    python-future \
    python-pymavlink \
    gnuradio-pmt \
    gnuradio-dev \
    gnuradio-dbg \
    gr-uaslink \
    gr-mapper \
    gr-burst \
    gr-eventstream \
    python-pyserial \
    "

repository: batmanwgd/meta-darpahackfest

repo_name: batmanwgd/meta-darpahackfest


text:
SUMMARY = "LevelDB is a fast key-value storage library"
DESCRIPTION = "LevelDB is a fast key-value storage library that provides an ordered mapping from string keys to string values"
HOMEPAGE = "https://github.com/google/leveldb"
LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://LICENSE;md5=92d1b128950b11ba8495b64938fc164d"

SRC_URI = "git://github.com/google/${BPN}.git;branch=main;protocol=https \
           file://run-ptest"

SRCREV = "78b39d68c15ba020c0d60a3906fb66dbf1697595"
S = "${WORKDIR}/git"

inherit cmake ptest

PACKAGECONFIG ??= ""
PACKAGECONFIG[benchmarks] = "-DLEVELDB_BUILD_BENCHMARKS=ON,-DLEVELDB_BUILD_BENCHMARKS=OFF,sqlite"
PACKAGECONFIG[snappy] = ",,snappy"
PACKAGECONFIG[tcmalloc] = ",,gperftools"

EXTRA_OECMAKE = "-DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_SHARED_LIBS=ON -DCMAKE_SKIP_RPATH=ON \
                 -DLEVELDB_BUILD_TESTS=${@bb.utils.contains('DISTRO_FEATURES', 'ptest', 'ON', 'OFF', d)}"

do_install:append() {
    install -D -m 0755 ${B}/leveldbutil ${D}${bindir}/leveldbutil
}

do_install_ptest() {
    install -m 0755 ${B}/*_test ${D}${PTEST_PATH}
}

# Do not try to build lib32-leveldb for mips64, but allow libn32-leveldb.
#
COMPATIBLE_HOST:mipsarcho32:pn-lib32-leveldb = "null"

repository: openembedded/meta-openembedded

repo_name: openembedded/meta-openembedded

gha_language: BitBake


text:
@article{Moncrieff2021-sa,
 abstract = {Abstract Long-term catchment experiments from South Africa have
demonstrated that afforestation of grasslands and shrublands
significantly reduces surface-water runoff. These results have
guided the country's forestry policy and the implementation of a
national Invasive Alien Plant (IAP) control programme for the
past few decades. Unfortunately, woody IAP densities continue to
increase, compounding existing threats to water security from
population growth and climatic change. Decision makers need
defensible estimates of the impacts of afforestation or
invasions on runoff to weigh up alternative land use options, or
guide investment of limited resources into ecosystem restoration
through IAP clearing versus engineering-based water-augmentation
schemes. Existing attempts to extrapolate the impacts observed
in catchment afforestation experiments to broad-scale IAP
impacts give no indication of uncertainty. Globally, the
uncertainty inherent in the results from paired-catchment
experiments is seldom propagated into subsequent analyses making
use of these data. We present a fully reproducible Bayesian
model that propagates uncertainty from input data to final
estimates of changes in streamflow when extrapolating from
catchment experiments to broader landscapes. We apply our model
to South Africa's catchment experiment data, estimating
streamflow losses to plantations and analogous plant invasions
in the catchments of southwestern South Africa, including
uncertainty. We estimate that regional streamflow is reduced by
304 million m3 or 4.14% annually as a result of IAPs, with an
upper estimate of 408 million m3 (5.54%) and a lower estimate
of 267 million m3 (3.63%). Our model quantifies uncertainty
associated with all parameters and their contribution to overall
uncertainty, helping guide future research needs. Acknowledging
and quantifying inherent uncertainty enables more defensible
decisions regarding water resource management.},
 author = {Moncrieff, Glenn R and Slingsby, Jasper A and Le Maitre, David C},
 copyright = {http://onlinelibrary.wiley.com/termsAndConditions#vor},
 doi = {10.1002/hyp.14161},
 file = {All Papers/M/Moncrieff et al. 2021 - Propagating uncertainty from catchment experimen ... mflow reduction by invasive alien plants in southwestern South Africa.pdf},
 issn = {0885-6087, 1099-1085},
 journal = {Hydrological processes},
 language = {en},
 month = {April},
 publisher = {Wiley},
 title = {Propagating uncertainty from catchment experiments to estimates
of streamflow reduction by invasive alien plants in southwestern
South Africa},
 year = {2021}
}

repository: SAEON/academic-kickstart

repo_name: SAEON/academic-kickstart


text:
// Code generated by mockery v0.0.0-dev. DO NOT EDIT.

package mocks

import (
	http "net/http"

	gql "github.com/weavedev/go-gqlclient"

	mock "github.com/stretchr/testify/mock"
)

// RequestBuilder is an autogenerated mock type for the RequestBuilder type
type RequestBuilder struct {
	mock.Mock
}

// Execute provides a mock function with given fields: endpoint, req
func (_m *RequestBuilder) Execute(endpoint string, req *gql.Request) (*http.Request, error) {
	ret := _m.Called(endpoint, req)

	var r0 *http.Request
	if rf, ok := ret.Get(0).(func(string, *gql.Request) *http.Request); ok {
		r0 = rf(endpoint, req)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*http.Request)
		}
	}

	var r1 error
	if rf, ok := ret.Get(1).(func(string, *gql.Request) error); ok {
		r1 = rf(endpoint, req)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

repository: weavedev/go-gqlclient

repo_name: weavedev/go-gqlclient


text:
# Copyright (C) 2015-2016 GENIVI Alliance
# Released under the MIT license (see COPYING.MIT for the terms)

LICENSE  = "MPL-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=9741c346eef56131163e13b9db1241b3"
SRC_URI = "git://github.com/GENIVI/connected-home"
SRCREV  = "2847ab9547be807d0767c69b0c0df7c90461fc6e"

SUMMARY = "Connected Home"
DEPENDS = "qtbase qtdeclarative"

S = "${WORKDIR}/git"

inherit qmake5

APP = "com.genivi.gdp.${PN}"
EXE = "qt-smart-demo"

SRC_URI_append ="\
    file://${APP}.desktop \
    "

do_install_append() {
     install -Dm 644 ${WORKDIR}/git/${APP}.svg \
                 ${D}/opt/${APP}/share/icons/${APP}.svg

     install -Dm 555 ${EXE} \
                 ${D}/opt/${APP}/bin/${EXE}

     install -Dm 644 ${WORKDIR}/${APP}.desktop \
                 ${D}/usr/share/applications/${APP}.desktop

     install -d ${WORKDIR}/git/imports \
                ${D}/opt/${APP}/bin/imports
}

FILES_${PN} += "\
    /opt/${APP} \
    /usr/bin/${EXE} \
    ${libdir} \
    ${libdir}/systemd \
    ${libdir}/systemd/user \
    ${libdir}/systemd/user/* \
    "

repository: chbae/genivi-dev-platform

repo_name: chbae/genivi-dev-platform


text:
SRC_URI = "git://github.com/linux-sunxi/cedarx-libs.git;protocol=git;branch=master \
          "

SRCREV = "${AUTOREV}"
PR = "r1"

PACKAGE_ARCH = "${MACHINE_ARCH}"

LICENSE = "CLOSED"

S = "${WORKDIR}/git/libcedarv/linux-armhf/"

do_install_append() {
    install -m 0755 $(find ${S} -name '*.so') ${D}${libdir}/
}

FILES_${PN} = "${libdir}/*"

repository: mtrx/meta-sunxi

repo_name: mtrx/meta-sunxi


text:
DESCRIPTION = "GNOME XML library"
SECTION = "libs"
PRIORITY = "optional"
LICENSE = "MIT"
PR = "r3"

SRC_URI = "http://xmlsoft.org/sources/libxml2/libxml2-${PV}.tar.gz \
		   file://no-testapi.patch;patch=1"

inherit autotools pkgconfig binconfig

EXTRA_OECONF = "--without-python --without-debug --without-legacy --without-catalog --without-docbook --without-c14n"

do_stage() {
	autotools_stage_all
	install -m 0644 libxml.m4 ${STAGING_DATADIR}/aclocal/
}

python populate_packages_prepend () {
	# autonamer would call this libxml2-2, but we don't want that
	if bb.data.getVar('DEBIAN_NAMES', d, 1):
		bb.data.setVar('PKG_libxml2', 'libxml2', d)
}

PACKAGES = "${PN}-dbg ${PN}-dev ${PN}-utils ${PN} ${PN}-doc ${PN}-locale"

FILES_${PN}-dev += "${bindir}/*-config"
FILES_${PN}-utils += "${bindir}/*"


text:
@article{mitros2020optic,
 author = {Mitros, Z. and Sadati, S. M. Hadi and Seneci, C. and Bloch, E. and Leibrandt, K. and Khadem, M. and Da Cruz*, L. and Bergeles*, C.},
 journal = {IEEE Robotics and Automation Letters},
 number = {2},
 pages = {2824--2831},
 title = {Optic nerve sheath fenestration with a multi-arm continuum robot},
 volume = {5},
 year = {2020}
}

repository: cbergeles/rvimlab-website

repo_name: cbergeles/rvimlab-website


text:
@article{Richardson:2020aa,
 abstract = {BACKGROUND: Extremes in water availability, either exceptionally wet or dry conditions, can damage crops and may detrimentally affect the livelihood and well-being of people engaged in agriculture. We estimated the effect of water availability on suicide in rural India, a context where the majority of households are dependent upon agriculture.
METHODS: We used data from a nationally representative sample of 8.5 million people who were monitored for causes of death from 2001 to 2013. Water availability was measured with high-resolution precipitation and temperature data (i.e., the Standardized Precipitation Evapotranspiration Index). We used a fixed effects approach that modeled changes in water availability within districts (n = 569) over time (n = 13 years) to estimate the impact on suicide deaths. We restricted our analysis to rural areas and to deaths occurring during the growing season (June-March) among adults aged 15 or older, and controlled for sex, age, region, and year. We used Poisson regression with standard errors clustered at the district level and total deaths as the offset.
RESULTS: There were 9456 suicides and 249,786 total deaths in our study population between 2001 and 2013. Compared to normal growing seasons, the percent of deaths due to suicide increased by 18.7% during extremely wet growing seasons (95% CI: 6.2, 31.2) and by 3.6% during extremely dry growing seasons (95% CI: -17.9, 25.0). We found that effects varied by age.
CONCLUSIONS: We found extremes is water availability associated with an increase in suicide. Abnormally wet growing conditions may play an important, yet overlooked, role in suicide among rural Indian adults.},
 author = {Richardson, Robin A and Harper, Sam and Weichenthal, Scott and Nandi, Arijit and Mishra, Vimal and Jha, Prabhat},
 bdsk-url-1 = {https://doi.org/10.1016/j.envres.2020.109969},
 date-added = {2020-09-24 17:39:20 -0400},
 date-modified = {2020-09-24 17:39:20 -0400},
 doi = {10.1016/j.envres.2020.109969},
 journal = {Environ Res},
 journal-full = {Environmental research},
 keywords = {Drought; India; Million deaths study; Standardized precipitation evapotranspiration index; Suicide},
 month = {Jul},
 pages = {109969},
 pmid = {32739270},
 pst = {aheadofprint},
 title = {Extremes in water availability and suicide: Evidence from a nationally representative sample of rural Indian adults},
 volume = {190},
 year = {2020}
}


text:
@article{adamsteinMakingMostModel,
	title = {Making the {Most} of a {Model}: {Interrogation} {Methods} for {Computer} {Codes}},
	copyright = {All rights reserved},
	doi = {10.31224/osf.io/npqs2},
	abstract = {Computer code models have become the default tool for analysis in many areas of research and industry. The research focus for evaluating these models has been primarily focused on theoretical simulation methods and overlooks the application of these methods. Many existing computer codes and models do not allow for simulation, uncertainty quantification, or other modern computing capabilities. These computer codes are generally comprised of two categories: those with limited operation by design and older legacy codes. Updating these software codes is not an option in many situations due to time constraints, cost, loss of skills needed to upgrade aging programming languages, lack of access to source code, and other constraints. This paper compiles and evaluates methods to systematically interrogate computer codes, including reduced iteration design of experiments (DoE) methods. It was determined that while several of these methods are routinely used in other fields, they have not been applied to computer code models. This paper discusses challenges present when evaluating computer codes and offers a decision framework for selecting interrogation methods. An example case study application of a definitive screening design (DSD) with the Atmospheric Relative Concentrations in Building Wakes (ARCON96) computer code is provided to illustrate use of the decision framework and application of DoE fractional factorial designs to computer codes.},
	journal = {engrXiv},
	author = {{Adam Stein} and {Kenneth Redus} and {Paul Fischbeck}},
	month = nov,
	year = {2020}
}

repository: energy-code/academic-website

repo_name: energy-code/academic-website


text:
inherit debianize
inherit sbuild

PV = "1.0"

SRC_URI = "git://github.com/eid-project/${PN}.git;protocol=https"
SRCREV = "759a1ce94da5a4702144f2058feb32af18c8a75e"

S = "${WORKDIR}/git"

do_debianize_append() {
	echo "libbaz 1 baz" > ${S}/debian/baz.shlibs
	echo "${libdir}/libbaz.so ${libdir}/libbaz.so.1" > ${S}/debian/baz.links
}

repository: toshiba/meta-eid

repo_name: toshiba/meta-eid


text:
DESCRIPTION = "Playlist parser for Totem, a GTK2 based media player"
HOMEPAGE = "http://www.gnome.org/projects/totem/"
LICENSE = "LGPLv2"

PR = "r1"

DEPENDS = "gmime eds-dbus"

inherit gnome

SRC_URI[archive.md5sum] = "81bf8e3043a9ec89bdd391c36ebd50d1"
SRC_URI[archive.sha256sum] = "403b18c1582c14effb4e2dabf339dfdbc45285204a0cf958fc250a387b6fc65c"

# Build of documentation is not yet possible:
do_configure() {
	sed -i -e s:docs::g ${S}/Makefile.am
	libtoolize --force
	gnu-configize --force
	oe_runconf
}

repository: libo/openembedded

repo_name: libo/openembedded

branch_name: HEAD


text:
// Copyright 2020 The ChromiumOS Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

package assistant

import (
	"context"
	"time"

	"chromiumos/tast/common/perf"
	"chromiumos/tast/ctxutil"
	"chromiumos/tast/errors"
	"chromiumos/tast/local/assistant"
	"chromiumos/tast/local/bundles/cros/assistant/assistantutils"
	"chromiumos/tast/local/chrome"
	"chromiumos/tast/local/chrome/ash"
	"chromiumos/tast/local/chrome/browser"
	"chromiumos/tast/local/chrome/browser/browserfixt"
	"chromiumos/tast/local/chrome/metrics"
	"chromiumos/tast/local/chrome/uiauto"
	"chromiumos/tast/local/chrome/uiauto/nodewith"
	"chromiumos/tast/local/cpu"
	uiconsts "chromiumos/tast/local/ui"
	"chromiumos/tast/testing"
)

func init() {
	testing.AddTest(&testing.Test{
		Func:         CardElementAnimationPerf,
		LacrosStatus: testing.LacrosVariantExists,
		Desc:         "Measures animation smoothness of card elements and transition from peeking to half height",
		Contacts:     []string{"cowmoo@chromium.org", "xiaohuic@chromium.org"},
		Attr:         []string{"group:crosbolt", "crosbolt_perbuild"},
		SoftwareDeps: []string{"chrome", "chrome_internal"},
		Params: []testing.Param{{
			Val:     browser.TypeAsh,
			Fixture: "assistantPerf",
		}, {
			Name:              "lacros",
			Val:               browser.TypeLacros,
			ExtraSoftwareDeps: []string{"lacros"},
			Fixture:           "assistantLacrosPerf",
		}},
	})
}

// CardElementAnimationPerf measures the animation performance of
// animating card elements in and out of the assistant frame. It also measures
// the performance of expanding the launcher from peeking to half height when
// a card is displayed.
func CardElementAnimationPerf(ctx context.Context, s *testing.State) {
	// Reserve a few seconds for cleanup.
	cleanupCtx := ctx
	ctx, cancel := ctxutil.Shorten(cleanupCtx, 10*time.Second)
	defer cancel()

	bt := s.Param().(browser.Type)

	fixtData := s.FixtValue().(*assistant.FixtData)
	cr := fixtData.Chrome
	accel, err := assistant.ResolveAssistantHotkey(s.Features(""))
	if err != nil {
		s.Fatal("Failed to resolve assistant hotkey: ", err)
	}

	tconn, err := cr.TestAPIConn(ctx)
	if err != nil {
		s.Fatal("Creating test API connection failed: ", err)
	}

	if err := assistant.SetBetterOnboardingEnabled(ctx, tconn, false); err != nil {
		s.Fatal("Failed to disable better onboarding: ", err)
	}

	ui := uiauto.New(tconn)
	pv := perf.NewValues()
	var br *browser.Browser
	for nWindows := 0; nWindows < 3; nWindows++ {
		// Open the browser windows. Also set up the browser the first time it opens.
		if nWindows == 1 {
			var conn *chrome.Conn
			var closeBrowser uiauto.Action
			var err error
			conn, br, closeBrowser, err = browserfixt.SetUpWithURL(ctx, cr, bt, uiconsts.PerftestURL)
			if err != nil {
				s.Fatal("Failed to create new browser window: ", err)
			}
			conn.Close()
			defer closeBrowser(cleanupCtx)
		} else if nWindows > 1 {
			if err := ash.CreateWindows(ctx, tconn, br, uiconsts.PerftestURL, 1); err != nil {
				s.Fatal("Failed to create a new browser window: ", err)
			}
		}

		if err := cpu.WaitUntilIdle(ctx); err != nil {
			s.Error("Failed to wait for system cpu idle: ", err)
		}

		if err := assistant.ToggleUIWithHotkey(ctx, tconn, accel); err != nil {
			s.Fatal("Failed opening assistant: ", err)
		}

		histograms, err := metrics.RunAndWaitAll(
			ctx,
			tconn,
			time.Second,
			func(ctx context.Context) error {
				return runCardQueries(ctx, tconn, ui)
			},
			// Card element opacity fade in / out.
			"Ash.Assistant.AnimationSmoothness.CardElement",
		)
		if err != nil {
			s.Fatal("Failed to collect histograms: ", err)
		}
		if err := assistantutils.ProcessHistogram(histograms, pv, nWindows); err != nil {
			s.Fatal("Failed to process histograms: ", err)
		}
	}

	if err := pv.Save(s.OutDir()); err != nil {
		s.Fatal("Failed saving perf data: ", err)
	}
}

// runCardQueries performs two card queries in order to test the animate in
// and animate out behavior of the first card.
func runCardQueries(ctx context.Context, tconn *chrome.TestConn, ui *uiauto.Context) error {
	for _, q := range []string{"Mount Everest", "Weather"} {
		if err := runCardQuery(ctx, tconn, ui, q); err != nil {
			return err
		}
	}

	return nil
}

// runCardQuery is a helper function for running an Assistant query and waiting
// for a card result.
func runCardQuery(ctx context.Context, tconn *chrome.TestConn, ui *uiauto.Context, query string) error {
	if _, err := assistant.SendTextQuery(ctx, tconn, query); err != nil {
		return errors.Wrapf(err, "could not send query: %s", query)
	}

	if err := ui.WithTimeout(5 * time.Second).WaitUntilExists(nodewith.ClassName("AssistantCardElementView"))(ctx); err != nil {
		return errors.Wrapf(err, "query results not shown for query %s within timeout", query)
	}

	return nil
}


text:
#
#  Copyright (C) 2021 mod.io Pty Ltd. <https://mod.io>
#
#  This file is part of the mod.io SDK.
#
#  Distributed under the MIT License. (See accompanying file LICENSE or
#   view online at <https://github.com/modio/modio-sdk/blob/main/LICENSE>)
#
#

macro(add_modio_implementation_file FilePath)
set_property(GLOBAL APPEND PROPERTY modio_implementation_files ${FilePath})
endmacro()

macro(add_modio_implementation_to_target Target)
get_property(impl_files GLOBAL PROPERTY modio_implementation_files)
target_sources(${Target} PRIVATE ${impl_files})
set_source_files_properties(${impl_files} TARGET_DIRECTORY ${Target} PROPERTIES LANGUAGE CXX)
endmacro()

macro(add_public_header Target FilePath)
set_property(TARGET ${Target} APPEND PROPERTY PUBLIC_HEADER ${FilePath})
endmacro()

macro(generate_implementation_source_target)
get_property(impl_files GLOBAL PROPERTY modio_implementation_files)
foreach(impl_file IN LISTS impl_files)
string(REPLACE ".ipp" ".cpp" renamed_file ${impl_file})
get_filename_component(file_only ${renamed_file} NAME)
install(
	FILES ${impl_file}
	RENAME ${file_only}
	DESTINATION ${CMAKE_INSTALL_PREFIX}/source
	COMPONENT source
)
endforeach()
add_custom_target(component_source
    COMMAND ${CMAKE_COMMAND} --install ${CMAKE_CURRENT_BINARY_DIR} --component source)
    set_target_properties(component_source PROPERTIES FOLDER "Installation/Packaging")
endmacro()

repository: SamsDRGMods/DRGLib

repo_name: SamsDRGMods/DRGLib


text:
function(add_prefix var prefix)
   SET(listVar "")
   FOREACH(f ${ARGN})
      LIST(APPEND listVar "${prefix}/${f}")
   ENDFOREACH(f)
   SET(${var} "${listVar}" PARENT_SCOPE)
endfunction()

function(add_engine_dependencies target_name)
	add_engine_dependencies2(${target_name} FALSE)
endfunction()

function(add_engine_dependencies2 target_name all_render_api)
	if(${all_render_api})
		if(WIN32)
			add_dependencies(${target_name} bsfD3D11RenderAPI bsfVulkanRenderAPI bsfGLRenderAPI)
		elseif(APPLE)
			add_dependencies(${target_name} bsfGLRenderAPI)
		else()
			add_dependencies(${target_name} bsfVulkanRenderAPI bsfGLRenderAPI)
		endif()
	else()
		if(RENDER_API_MODULE MATCHES "DirectX 11")
			add_dependencies(${target_name} bsfD3D11RenderAPI)
		elseif(RENDER_API_MODULE MATCHES "Vulkan")
			add_dependencies(${target_name} bsfVulkanRenderAPI)
		else()
			add_dependencies(${target_name} bsfGLRenderAPI)
		endif()
	endif()

	if(AUDIO_MODULE MATCHES "FMOD")
		add_dependencies(${target_name} bsfFMOD)
	else() # Default to OpenAudio
		add_dependencies(${target_name} bsfOpenAudio)
	endif()

	add_dependencies(${target_name} bsfSL bsfPhysX bsfRenderBeast)
endfunction()

function(add_importer_dependencies target_name)
	add_dependencies(${target_name} bsfFBXImporter bsfFontImporter bsfFreeImgImporter bsfSL)
endfunction()

function(add_subdirectory_optional subdir_name)
	get_filename_component(fullPath ${subdir_name} ABSOLUTE)
	if(EXISTS ${fullPath}/CMakeLists.txt)
		add_subdirectory(${subdir_name})
	endif()
endfunction()

# Generates a set of variables pointing to the default locations for library's includes and binaries.
# Must be defined before calling:
#  - ${LIB_NAME}_INSTALL_DIR
#
# Will define:
#  - ${LIB_NAME}_INCLUDE_SEARCH_DIRS
#  - ${LIB_NAME}_LIBRARY_RELEASE_SEARCH_DIRS
#  - ${LIB_NAME}_LIBRARY_DEBUG_SEARCH_DIRS
MACRO(gen_default_lib_search_dirs LIB_NAME)
	set(${LIB_NAME}_INCLUDE_SEARCH_DIRS "${${LIB_NAME}_INSTALL_DIR}/include")

	if(BS_64BIT)
		list(APPEND ${LIB_NAME}_LIBRARY_RELEASE_SEARCH_DIRS "${${LIB_NAME}_INSTALL_DIR}/lib/x64/Release")
		list(APPEND ${LIB_NAME}_LIBRARY_DEBUG_SEARCH_DIRS "${${LIB_NAME}_INSTALL_DIR}/lib/x64/Debug")
	else()
		list(APPEND ${LIB_NAME}_LIBRARY_RELEASE_SEARCH_DIRS "${${LIB_NAME}_INSTALL_DIR}/lib/x86/Release")
		list(APPEND ${LIB_NAME}_LIBRARY_DEBUG_SEARCH_DIRS "${${LIB_NAME}_INSTALL_DIR}/lib/x86/Debug")
	endif()

	# Allow for paths without a configuration specified
	if(BS_64BIT)
		list(APPEND ${LIB_NAME}_LIBRARY_RELEASE_SEARCH_DIRS "${${LIB_NAME}_INSTALL_DIR}/lib/x64")
		list(APPEND ${LIB_NAME}_LIBRARY_DEBUG_SEARCH_DIRS "${${LIB_NAME}_INSTALL_DIR}/lib/x64")
	else()
		list(APPEND ${LIB_NAME}_LIBRARY_RELEASE_SEARCH_DIRS "${${LIB_NAME}_INSTALL_DIR}/lib/x86")
		list(APPEND ${LIB_NAME}_LIBRARY_DEBUG_SEARCH_DIRS "${${LIB_NAME}_INSTALL_DIR}/lib/x86")
	endif()

	# Allow for paths without a platform specified
	list(APPEND ${LIB_NAME}_LIBRARY_RELEASE_SEARCH_DIRS "${${LIB_NAME}_INSTALL_DIR}/lib/Release")
	list(APPEND ${LIB_NAME}_LIBRARY_DEBUG_SEARCH_DIRS "${${LIB_NAME}_INSTALL_DIR}/lib/Debug")

	# Allow for paths without a platform or configuration specified
	list(APPEND ${LIB_NAME}_LIBRARY_RELEASE_SEARCH_DIRS "${${LIB_NAME}_INSTALL_DIR}/lib")
	list(APPEND ${LIB_NAME}_LIBRARY_DEBUG_SEARCH_DIRS "${${LIB_NAME}_INSTALL_DIR}/lib")
ENDMACRO()

MACRO(add_imported_library LIB_NAME RELEASE_NAME DEBUG_NAME IS_SHARED)
	if(${IS_SHARED} AND NOT WIN32)
		add_library(${LIB_NAME} SHARED IMPORTED)
	else()
		add_library(${LIB_NAME} STATIC IMPORTED)
	endif()

	if(CMAKE_CONFIGURATION_TYPES) # Multiconfig generator?
		set_target_properties(${LIB_NAME} PROPERTIES IMPORTED_LOCATION_DEBUG "${DEBUG_NAME}")
		set_target_properties(${LIB_NAME} PROPERTIES IMPORTED_LOCATION_RELWITHDEBINFO "${RELEASE_NAME}")
		set_target_properties(${LIB_NAME} PROPERTIES IMPORTED_LOCATION_MINSIZEREL "${RELEASE_NAME}")
		set_target_properties(${LIB_NAME} PROPERTIES IMPORTED_LOCATION_RELEASE "${RELEASE_NAME}")
	else()
		set_target_properties(${LIB_NAME} PROPERTIES IMPORTED_LOCATION "${RELEASE_NAME}")
	endif()
ENDMACRO()

MACRO(find_imported_library3 FOLDER_NAME LIB_NAME DEBUG_LIB_NAME IS_SHARED)
	find_library(${LIB_NAME}_LIBRARY_RELEASE NAMES ${LIB_NAME} PATHS ${${FOLDER_NAME}_LIBRARY_RELEASE_SEARCH_DIRS} NO_DEFAULT_PATH)
	find_library(${LIB_NAME}_LIBRARY_RELEASE NAMES ${LIB_NAME} PATHS ${${FOLDER_NAME}_LIBRARY_RELEASE_SEARCH_DIRS})

	if(${FOLDER_NAME}_LIBRARY_DEBUG_SEARCH_DIRS)
		find_library(${LIB_NAME}_LIBRARY_DEBUG NAMES ${DEBUG_LIB_NAME} PATHS ${${FOLDER_NAME}_LIBRARY_DEBUG_SEARCH_DIRS} NO_DEFAULT_PATH)
		find_library(${LIB_NAME}_LIBRARY_DEBUG NAMES ${DEBUG_LIB_NAME} PATHS ${${FOLDER_NAME}_LIBRARY_DEBUG_SEARCH_DIRS})
	else()
		find_library(${LIB_NAME}_LIBRARY_DEBUG NAMES ${DEBUG_LIB_NAME} PATHS ${${FOLDER_NAME}_LIBRARY_RELEASE_SEARCH_DIRS} NO_DEFAULT_PATH)
		find_library(${LIB_NAME}_LIBRARY_DEBUG NAMES ${DEBUG_LIB_NAME} PATHS ${${FOLDER_NAME}_LIBRARY_RELEASE_SEARCH_DIRS})
	endif()

	if(${LIB_NAME}_LIBRARY_RELEASE)
		if(${LIB_NAME}_LIBRARY_DEBUG)
			add_imported_library(${FOLDER_NAME}::${LIB_NAME} "${${LIB_NAME}_LIBRARY_RELEASE}"
				"${${LIB_NAME}_LIBRARY_DEBUG}" ${IS_SHARED})
		else()
			add_imported_library(${FOLDER_NAME}::${LIB_NAME} "${${LIB_NAME}_LIBRARY_RELEASE}"
				"${${LIB_NAME}_LIBRARY_RELEASE}" ${IS_SHARED})
		endif()
	else()
		set(${FOLDER_NAME}_FOUND FALSE)
		message(STATUS "...Cannot find imported library: ${LIB_NAME} ${${LIB_NAME}_LIBRARY_RELEASE}")
	endif()

	list(APPEND ${FOLDER_NAME}_LIBRARIES ${FOLDER_NAME}::${LIB_NAME})
	mark_as_advanced(${LIB_NAME}_LIBRARY_RELEASE ${LIB_NAME}_LIBRARY_DEBUG)
ENDMACRO()

MACRO(find_imported_library_shared2 FOLDER_NAME LIB_NAME DEBUG_LIB_NAME)
		list(APPEND ${FOLDER_NAME}_SHARED_LIBS ${LIB_NAME})
	find_imported_library3(${FOLDER_NAME} ${LIB_NAME} ${DEBUG_LIB_NAME} TRUE)
ENDMACRO()

MACRO(find_imported_library_shared FOLDER_NAME LIB_NAME)
	list(APPEND ${FOLDER_NAME}_SHARED_LIBS ${LIB_NAME})
	find_imported_library_shared2(${FOLDER_NAME} ${LIB_NAME} ${LIB_NAME})
ENDMACRO()

MACRO(find_imported_library2 FOLDER_NAME LIB_NAME DEBUG_LIB_NAME)
	find_imported_library3(${FOLDER_NAME} ${LIB_NAME} ${DEBUG_LIB_NAME} FALSE)
ENDMACRO()

MACRO(find_imported_library FOLDER_NAME LIB_NAME)
	find_imported_library2(${FOLDER_NAME} ${LIB_NAME} ${LIB_NAME})
ENDMACRO()

MACRO(find_imported_includes FOLDER_NAME INCLUDE_FILES)
	find_path(${FOLDER_NAME}_INCLUDE_DIR NAMES ${INCLUDE_FILES} PATHS ${${FOLDER_NAME}_INCLUDE_SEARCH_DIRS} NO_DEFAULT_PATH)
	find_path(${FOLDER_NAME}_INCLUDE_DIR NAMES ${INCLUDE_FILES} PATHS ${${FOLDER_NAME}_INCLUDE_SEARCH_DIRS})

	if(${FOLDER_NAME}_INCLUDE_DIR)
		set(${FOLDER_NAME}_FOUND TRUE)
	else()
		message(STATUS "...Cannot find include file \"${INCLUDE_FILES}\" at path ${${FOLDER_NAME}_INCLUDE_SEARCH_DIRS}")
		set(${FOLDER_NAME}_FOUND FALSE)
	endif()
ENDMACRO()

MACRO(start_find_package FOLDER_NAME)
	message(STATUS "Looking for ${FOLDER_NAME} installation...")
ENDMACRO()

MACRO(end_find_package FOLDER_NAME MAIN_LIB_NAME)
	if(NOT ${FOLDER_NAME}_FOUND)
		if(${FOLDER_NAME}_FIND_REQUIRED)
			message(FATAL_ERROR "Cannot find ${FOLDER_NAME} installation. Try modifying the ${FOLDER_NAME}_INSTALL_DIR path.")
		elseif(NOT ${FOLDER_NAME}_FIND_QUIETLY)
			message(WARNING "Cannot find ${FOLDER_NAME} installation. Try modifying the ${FOLDER_NAME}_INSTALL_DIR path.")
		endif()
	else()
		set_target_properties(${FOLDER_NAME}::${MAIN_LIB_NAME} PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${${FOLDER_NAME}_INCLUDE_DIR}")
		message(STATUS "...${FOLDER_NAME} OK.")
	endif()

	mark_as_advanced(${FOLDER_NAME}_INSTALL_DIR ${FOLDER_NAME}_INCLUDE_DIR)
	set(${FOLDER_NAME}_INCLUDE_DIRS ${${FOLDER_NAME}_INCLUDE_DIR})
ENDMACRO()

MACRO(install_dependency_binaries FOLDER_NAME)
	foreach(LOOP_ENTRY ${${FOLDER_NAME}_SHARED_LIBS})
		get_filename_component(RELEASE_FILENAME ${${LOOP_ENTRY}_LIBRARY_RELEASE} NAME_WE)
		get_filename_component(DEBUG_FILENAME ${${LOOP_ENTRY}_LIBRARY_DEBUG} NAME_WE)

		if(WIN32)
			if(BS_64BIT)
				set(PLATFORM "x64")
			else()
				set(PLATFORM "x86")
			endif()

			set(RELEASE_FILENAME ${RELEASE_FILENAME}.dll)
			set(DEBUG_FILENAME ${DEBUG_FILENAME}.dll)

			set(SRC_RELEASE "${PROJECT_SOURCE_DIR}/bin/${PLATFORM}/Release/${RELEASE_FILENAME}")
			set(SRC_DEBUG "${PROJECT_SOURCE_DIR}/bin/${PLATFORM}/Debug/${DEBUG_FILENAME}")
			set(DESTINATION_DIR bin)
		else()
			set(RELEASE_FILENAME ${RELEASE_FILENAME}.so)
			set(DEBUG_FILENAME ${DEBUG_FILENAME}.so)
			set(SRC_RELEASE ${${LOOP_ENTRY}_LIBRARY_RELEASE})
			set(SRC_DEBUG ${${LOOP_ENTRY}_LIBRARY_DEBUG})
			set(DESTINATION_DIR lib)
		endif()

		install(
			FILES ${SRC_RELEASE}
			DESTINATION ${DESTINATION_DIR}
			CONFIGURATIONS Release RelWithDebInfo MinSizeRel
			RENAME ${RELEASE_FILENAME}
			OPTIONAL)

		install(
			FILES ${SRC_DEBUG}
			DESTINATION ${DESTINATION_DIR}
			CONFIGURATIONS Debug
			RENAME ${DEBUG_FILENAME}
			OPTIONAL)
	endforeach()
ENDMACRO()

function(target_link_framework TARGET FRAMEWORK)
	find_library(FM_${FRAMEWORK} ${FRAMEWORK})

	if(NOT FM_${FRAMEWORK})
		message(FATAL_ERROR "Cannot find ${FRAMEWORK} framework.")
	endif()

	target_link_libraries(${TARGET} PRIVATE ${FM_${FRAMEWORK}})
	mark_as_advanced(FM_${FRAMEWORK})
endfunction()

set(BS_BINARY_DEP_WEBSITE "https://data.banshee3d.com" CACHE STRING "The location that binary dependencies will be pulled from. Must follow the same naming scheme as data.banshee3d.com")
mark_as_advanced(BS_BINARY_DEP_WEBSITE)

function(update_binary_deps DEP_PREFIX DEP_FOLDER DEP_VERSION)
	# Clean and create a temporary folder
	execute_process(COMMAND ${CMAKE_COMMAND} -E remove_directory ${PROJECT_SOURCE_DIR}/Temp)
	execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${PROJECT_SOURCE_DIR}/Temp)

	if(WIN32)
		set(DEP_TYPE VS2015)
	elseif(LINUX)
		set(DEP_TYPE Linux)
	elseif(APPLE)
		set(DEP_TYPE macOS)
	endif()

	set(BINARY_DEPENDENCIES_URL ${BS_BINARY_DEP_WEBSITE}/${DEP_PREFIX}Dependencies_${DEP_TYPE}_Master_${DEP_VERSION}.zip)
	file(DOWNLOAD ${BINARY_DEPENDENCIES_URL} ${PROJECT_SOURCE_DIR}/Temp/Dependencies.zip
		SHOW_PROGRESS
		STATUS DOWNLOAD_STATUS)

	list(GET DOWNLOAD_STATUS 0 STATUS_CODE)
	if(NOT STATUS_CODE EQUAL 0)
		message(FATAL_ERROR "Binary dependencies failed to download from URL: ${BINARY_DEPENDENCIES_URL}")
	endif()

	message(STATUS "Extracting files. Please wait...")
	execute_process(
		COMMAND ${CMAKE_COMMAND} -E tar xzf ${PROJECT_SOURCE_DIR}/Temp/Dependencies.zip
		WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/Temp
	)

	# Copy executables and dynamic libraries
	execute_process(COMMAND ${CMAKE_COMMAND} -E copy_directory ${PROJECT_SOURCE_DIR}/Temp/bin ${DEP_FOLDER}/../bin)

	# Copy static libraries, headers and tools
	execute_process(COMMAND ${CMAKE_COMMAND} -E remove_directory ${DEP_FOLDER})
	execute_process(COMMAND ${CMAKE_COMMAND} -E copy_directory ${PROJECT_SOURCE_DIR}/Temp/Dependencies ${DEP_FOLDER})

	# Clean up
	execute_process(COMMAND ${CMAKE_COMMAND} -E remove_directory ${PROJECT_SOURCE_DIR}/Temp)
endfunction()

function(check_and_update_binary_deps DEP_PREFIX DEP_FOLDER DEP_VERSION)
	set(BUILTIN_DEP_VERSION_FILE ${DEP_FOLDER}/.version)
	if(NOT EXISTS ${BUILTIN_DEP_VERSION_FILE})
		message(STATUS "Binary dependencies for '${DEP_PREFIX}' are missing. Downloading package...")
		update_binary_deps(${DEP_PREFIX} ${DEP_FOLDER} ${DEP_VERSION})
	else()
		file (STRINGS ${BUILTIN_DEP_VERSION_FILE} CURRENT_DEP_VERSION)
		if(${DEP_VERSION} GREATER ${CURRENT_DEP_VERSION})
			message(STATUS "Your precomiled dependencies package for '${DEP_PREFIX}' is out of date. Downloading latest package...")
			update_binary_deps(${DEP_PREFIX} ${DEP_FOLDER} ${DEP_VERSION})
		endif()
	endif()
endfunction()

function(strip_symbols targetName outputFilename)
	if(UNIX)
		if(CMAKE_BUILD_TYPE STREQUAL Release)
			set(fileToStrip $<TARGET_FILE:${targetName}>)

			# macOS
			if(CMAKE_SYSTEM_NAME STREQUAL Darwin)
				set(symbolsFile ${fileToStrip}.dwarf)

				add_custom_command(
					TARGET ${targetName}
					POST_BUILD
					VERBATIM
					COMMAND ${DSYMUTIL_TOOL} --flat --minimize ${fileToStrip}
					COMMAND ${STRIP_TOOL} -u -r ${fileToStrip}
					COMMENT Stripping symbols from ${fileToStrip} into file ${symbolsFile}
				)

			# Linux
			else()
				set(symbolsFile ${fileToStrip}.dbg)

				add_custom_command(
					TARGET ${targetName}
					POST_BUILD
					VERBATIM
					COMMAND ${OBJCOPY_TOOL} --only-keep-debug ${fileToStrip} ${symbolsFile}
					COMMAND ${OBJCOPY_TOOL} --strip-unneeded ${fileToStrip}
					COMMAND ${OBJCOPY_TOOL} --add-gnu-debuglink=${symbolsFile} ${fileToStrip}
					COMMENT Stripping symbols from ${fileToStrip} into file ${symbolsFile}
				)
			endif(CMAKE_SYSTEM_NAME STREQUAL Darwin)

			set(${outputFilename} ${symbolsFile} PARENT_SCOPE)
		endif()
	endif()
endfunction()

function(install_bsf_target targetName)
	strip_symbols(${targetName} symbolsFile)

	install(
		TARGETS ${targetName}
		RUNTIME DESTINATION bin
		LIBRARY DESTINATION lib
		ARCHIVE DESTINATION lib
	)

	if(MSVC)
		install(
			FILES $<TARGET_PDB_FILE:${targetName}>
			DESTINATION bin
			OPTIONAL
		)
	else()
		install(
			FILES ${symbolsFile}
			DESTINATION lib
			OPTIONAL)
	endif()
endfunction()

function(copyBsfBinaries target srcDir)
	if(WIN32)
		set(BIN_SRC_DIR "${srcDir}/bin")
		set(BIN_DST_DIR ${PROJECT_SOURCE_DIR}/bin)

		file(GLOB_RECURSE BIN_FILES RELATIVE ${BIN_SRC_DIR} "${BIN_SRC_DIR}/*.dll")

		foreach(CUR_PATH ${BIN_FILES})
			get_filename_component(FILENAME ${CUR_PATH} NAME)

			if(FILENAME MATCHES "^bsf.*")
				continue()
			endif()

			set(SRC ${BIN_SRC_DIR}/${CUR_PATH})
			set(DST ${BIN_DST_DIR}/${CUR_PATH})
			add_custom_command(
			   TARGET ${target} POST_BUILD
			   COMMAND ${CMAKE_COMMAND}
			   ARGS    -E copy_if_different ${SRC} ${DST}
			   COMMENT "Copying ${SRC} ${DST}\n"
			   )
		endforeach()
	endif()
endfunction()

#######################################################################################
##################### Built-in asset import and versioning ############################
#######################################################################################

function(update_builtin_assets ASSET_PREFIX ASSET_FOLDER FOLDER_NAME ASSET_VERSION CLEAR_MANIFEST)
	# Clean and create a temporary folder
	execute_process(COMMAND ${CMAKE_COMMAND} -E remove_directory ${PROJECT_SOURCE_DIR}/Temp)
	execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${PROJECT_SOURCE_DIR}/Temp)

	set(ASSET_DEPENDENCIES_URL ${BS_BINARY_DEP_WEBSITE}/${ASSET_PREFIX}Data_Master_${ASSET_VERSION}.zip)
	file(DOWNLOAD ${ASSET_DEPENDENCIES_URL} ${PROJECT_SOURCE_DIR}/Temp/Dependencies.zip
		SHOW_PROGRESS
		STATUS DOWNLOAD_STATUS)

	list(GET DOWNLOAD_STATUS 0 STATUS_CODE)
	if(NOT STATUS_CODE EQUAL 0)
		message(FATAL_ERROR "Builtin assets failed to download from URL: ${ASSET_DEPENDENCIES_URL}")
	endif()

	message(STATUS "Extracting files. Please wait...")
	execute_process(
		COMMAND ${CMAKE_COMMAND} -E tar xzf ${PROJECT_SOURCE_DIR}/Temp/Dependencies.zip
		WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/Temp
	)

	# Copy files
	execute_process(COMMAND ${CMAKE_COMMAND} -E copy_directory ${PROJECT_SOURCE_DIR}/Temp/${FOLDER_NAME} ${ASSET_FOLDER})

	# Make sure timestamp modify date/times are newer (avoids triggering reimport)
	execute_process(COMMAND ${CMAKE_COMMAND} -E touch ${ASSET_FOLDER}/Timestamp.asset )

	# Make sure resource manifests get rebuilt
	if(CLEAR_MANIFEST)
		execute_process(COMMAND ${CMAKE_COMMAND} -E remove ${ASSET_FOLDER}/ResourceManifest.asset)
	endif()

	# Clean up
	execute_process(COMMAND ${CMAKE_COMMAND} -E remove_directory ${PROJECT_SOURCE_DIR}/Temp)
endfunction()

function(check_and_update_builtin_assets ASSET_PREFIX ASSET_FOLDER FOLDER_NAME ASSET_VERSION CLEAR_MANIFEST)
	set(BUILTIN_ASSETS_VERSION_FILE ${ASSET_FOLDER}/.version)
	if(NOT EXISTS ${BUILTIN_ASSETS_VERSION_FILE})
		message(STATUS "Builtin assets for '${ASSET_PREFIX}' are missing. Downloading package...")
		update_builtin_assets(${ASSET_PREFIX} ${ASSET_FOLDER} ${FOLDER_NAME} ${ASSET_VERSION} ${CLEAR_MANIFEST})
	else()
		file (STRINGS ${BUILTIN_ASSETS_VERSION_FILE} CURRENT_BUILTIN_ASSET_VERSION)
		if(${ASSET_VERSION} GREATER ${CURRENT_BUILTIN_ASSET_VERSION})
			message(STATUS "Your builtin asset package for '${ASSET_PREFIX}' is out of date. Downloading latest package...")
			update_builtin_assets(${ASSET_PREFIX} ${ASSET_FOLDER} ${FOLDER_NAME} ${ASSET_VERSION} ${CLEAR_MANIFEST})
		endif()
	endif()
endfunction()

set(BS_FTP_CREDENTIALS_FILE "${PROJECT_SOURCE_DIR}/../ftp_credentials" CACHE STRING "The location containing the FTP server credentials to use for uploading packages. The file is expected to contain three lines: URL/Username/Password, in that order.")
mark_as_advanced(BS_FTP_CREDENTIALS_FILE)

function(update_data_file_package _NAME _FOLDER _FILES)
	message(STATUS "Updating data files package...")

	# Get FTP credentials needed for upload
	if(NOT EXISTS ${BS_FTP_CREDENTIALS_FILE})
		message("FTP credentials are missing at ${BS_FTP_CREDENTIALS_FILE}.")
		message(STATUS "...aborting data file packaging.")
		return()
	endif()

	file (STRINGS ${BS_FTP_CREDENTIALS_FILE} FTP_CREDENTIALS)

	list(GET FTP_CREDENTIALS 0 FTP_URL)
	list(GET FTP_CREDENTIALS 1 FTP_USER)
	list(GET FTP_CREDENTIALS 2 FTP_PW)

	# Get current version
	set(REQUESTED_VERSION_FILE ${_FOLDER}/.reqversion)
	set(CURRENT_VERSION_FILE ${_FOLDER}/.version)

	file (STRINGS ${REQUESTED_VERSION_FILE} CURRENT_VERSION_NUM)
	math(EXPR NEW_VERSION_NUM "${CURRENT_VERSION_NUM}+1")

	# Clean and create a temporary folder
	execute_process(COMMAND ${CMAKE_COMMAND} -E remove_directory ${PROJECT_SOURCE_DIR}/Temp)
	execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${PROJECT_SOURCE_DIR}/Temp)

	# Update version number in the package
	file(WRITE ${CURRENT_VERSION_FILE} ${NEW_VERSION_NUM})

	# Generate an archive with data files
	set(ARCHIVE_FILENAME ${_NAME}_${NEW_VERSION_NUM}.zip)
	set(ARCHIVE_PATH ${PROJECT_SOURCE_DIR}/Temp/${ARCHIVE_FILENAME})

	execute_process(
		COMMAND
			${CMAKE_COMMAND} -E tar
			"cf" "${ARCHIVE_PATH}" --format=zip
		    --files-from=${_FOLDER}/${_FILES}
		WORKING_DIRECTORY "${_FOLDER}/.."
		RESULT_VARIABLE ARCHIVE_STATUS_CODE
		ERROR_VARIABLE ARCHIVE_ERROR_MESSAGE
	)

	if(NOT ARCHIVE_STATUS_CODE EQUAL 0)
		message("Failed to create archive file: ${ARCHIVE_PATH}. Error: ${ARCHIVE_ERROR_MESSAGE}")
		message(STATUS "...aborting data file packaging.")
		return()
	endif()

	# Upload the package
	message(STATUS "   Uploading data package: ${ARCHIVE_FILENAME}")
	file(
		UPLOAD "${ARCHIVE_PATH}" "${FTP_URL}/${ARCHIVE_FILENAME}"
		USERPWD ${FTP_USER}:${FTP_PW}
		STATUS UPLOAD_STATUS_CODE
		SHOW_PROGRESS)

	if(NOT UPLOAD_STATUS_CODE EQUAL 0)
		message("Failed to upload file: ${ARCHIVE_PATH}. Error code: ${UPLOAD_STATUS_CODE}")
		message(STATUS "...aborting data file packaging.")
	endif()

	# Update active version number (only if everything else succeeds)
	file(WRITE ${REQUESTED_VERSION_FILE} ${NEW_VERSION_NUM})

	# Clean up
	execute_process(COMMAND ${CMAKE_COMMAND} -E remove_directory ${PROJECT_SOURCE_DIR}/Temp)

	message(STATUS "...data file packaging succesful, new version is ${NEW_VERSION_NUM}.")
endfunction()

function(run_import_tool _PREFIX _FOLDER _ARGS)
	find_package(bsfImportTool)

	message(STATUS "Checking built-in assets for modifications for '${_PREFIX}'...")

	# Cannot find binaries, see if we can compile them
	if(NOT bsfImportTool_FOUND)
		message("...bsfImportTool binaries cannot be found. Build the bsfImportTool target and install it to Dependencies/tools/bsfImportTool.")
		message(STATUS "...aborting data file packaging.")
		return()
	endif()

	execute_process(
		COMMAND ${bsfImportTool_EXECUTABLE} ${_FOLDER}/Data/Raw/ ${_FOLDER}/Data/ ${_ARGS}
		COMMENT "...importing files, please wait."
		RESULT_VARIABLE IMPORT_STATUS_CODE
	)

	if((NOT IMPORT_STATUS_CODE EQUAL 0) AND (NOT IMPORT_STATUS_CODE EQUAL 1))
		message("Failed to import built-in assets. Error code: ${IMPORT_STATUS_CODE}")
		message(STATUS "...aborting data file packaging.")
		return()
	endif()

	if(IMPORT_STATUS_CODE EQUAL 0)
		message(STATUS "...done, no built-in assets modifications detected.")
		return()
	endif()

	message(STATUS "...built-in asset import successful.")

	if(${UPLOAD_ASSETS})
		if(IMPORT_STATUS_CODE EQUAL 1)
			update_data_file_package("${_PREFIX}CompiledData_Master" ${_FOLDER}/Data Raw/DataPackageContents.txt)
		endif()
	endif()
endfunction()

#######################################################################################
##################### Precompiled header (Cotire) related #############################
#######################################################################################

function(find_clang_invalid_libc_pch_headers banned_files)
	if (NOT UNIX)
		return()
	endif()

	if (CMAKE_C_COMPILER_ID MATCHES "Clang")
		execute_process(COMMAND ${CMAKE_C_COMPILER} -E -x c - -v
						INPUT_FILE /dev/null
						OUTPUT_FILE /dev/null
			            ERROR_VARIABLE clang_c_raw_verbose)

		string(REGEX MATCHALL "\n /[^\n]*" clang_c_search_dirs "${clang_c_raw_verbose}")
		string(REPLACE "\n " "" clang_c_search_dirs "${clang_c_search_dirs}")

		find_file(inttypes_c_location "inttypes.h" PATHS ${clang_c_search_dirs} PATH_SUFFIXES include NO_DEFAULT_PATH)
	endif()

	if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
		execute_process(COMMAND ${CMAKE_CXX_COMPILER} -E -x c++ - -v
						INPUT_FILE /dev/null
						OUTPUT_FILE /dev/null
			            ERROR_VARIABLE clang_cxx_raw_verbose)

		string(REGEX MATCHALL "\n /[^\n]*" clang_cxx_search_dirs "${clang_cxx_raw_verbose}")
		string(REPLACE "\n " "" clang_cxx_search_dirs "${clang_cxx_search_dirs}")

		find_file(inttypes_cxx_location "inttypes.h" PATHS ${clang_cxx_search_dirs} PATH_SUFFIXES include NO_DEFAULT_PATH)
	endif()
	set(${banned_files} ${inttypes_c_location} ${inttypes_cxx_location} PARENT_SCOPE)
endfunction()

function(find_windows_system_headers paths files_to_find)
	if (NOT MSVC)
		return()
	endif()

	set(file_string "int main(){}\n")

	foreach (file ${files_to_find})
		set(file_string "${file_string}\n#include<${file}>")
	endforeach()

	file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/default_headers.h.cxx"
	           ${file_string})

	if (COTIRE_DEBUG)
		message(STATUS "Compiling the following file to find ${files_to_find}: " ${file_string})
	endif()

	try_compile(try_compile_result "${CMAKE_CURRENT_BINARY_DIR}" "${CMAKE_CURRENT_BINARY_DIR}/default_headers.h.cxx"
            COMPILE_DEFINITIONS /showIncludes
            OUTPUT_VARIABLE try_compile_output
            )

	if (COTIRE_DEBUG)
		message(STATUS "${try_compile_output}")
	endif()

	string(REGEX MATCHALL "Note: including file:\\w*([^\n]*)" include_list "${try_compile_output}")

	set(to_return "")

	foreach(entry ${include_list})
		string(REGEX REPLACE "Note: including file:\\w*([^\n]*)" "\\1" entry_path "${entry}")
		foreach (file ${files_to_find})
			if (${entry_path} MATCHES "${file}")
				string(STRIP ${entry_path} entry_path_stripped)
				file(TO_CMAKE_PATH "${entry_path_stripped}" entry_path_stripped_slashes)
				set(to_return ${to_return} ${entry_path_stripped_slashes})
			endif()
		endforeach()
	endforeach()

	set(${paths} ${to_return} PARENT_SCOPE)
endfunction()

macro(conditional_cotire)
	if(COMMAND cotire)
		cotire(${ARGN})
	endif()
endmacro()

repository: xytovl/bsf

repo_name: xytovl/bsf


text:
SECTION = "base"
DESCRIPTION = "kernel routing and traffic control utilities"
LICENSE = "GPL"

SRC_URI="http://developer.osdl.org/dev/iproute2/download/iproute2-2.6.8-ss040730.tar.gz \
	file://iproute2-2.6.8_no_strip.diff;patch=1;pnum=0"

PR="r1"

EXTRA_OEMAKE = "CC='${CC}' KERNEL_INCLUDE=${STAGING_KERNEL_DIR}/include DOCDIR=${docdir}/iproute2 SUBDIRS='lib tc ip' SBINDIR=/sbin"

do_install () {
	oe_runmake DESTDIR=${D} install
}


text:
function(bges_configure_target target_name)
    if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
        target_compile_definitions(${target_name} PRIVATE OS_WINDOWS NOMINMAX)

    elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
        target_compile_definitions(${target_name} PRIVATE OS_LINUX)
    else()
        message(FATAL_ERROR "unsupported OS")
    endif()

    set_target_properties(
        ${target_name}
        PROPERTIES
            CXX_STANDARD 20
            CXX_STANDARD_REQUIRED ON
            CXX_EXTENSIONS OFF
            DEBUG_POSTFIX dbg
    )

    target_include_directories(${target_name} PRIVATE common/)
endfunction()

function(bges_link_threads target_name)
    if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
        set(THREADS_PREFER_PTHREAD_FLAG ON)
        find_package(Threads REQUIRED)
        target_link_libraries(${target_name} Threads::Threads)
    endif()

endfunction()

function(bges_link_filesystem target_name)
    if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
        target_link_libraries(${target_name} stdc++fs)
    endif()
endfunction()

repository: Organic-Code/bges

repo_name: Organic-Code/bges


text:
@inproceedings{nyga15fuzzymln,
  note = {Preprint: \url{http://arxiv.org/abs/1504.05411}},
  booktitle = {Arxiv.org},
  author = {Daniel Nyga and Michael Beetz},
  year = {2015},
  title = {{Reasoning about Unmodelled Concepts -- Incorporating Class Taxonomies in Probabilistic Relational Models}}
}

@inproceedings{nyga15prac,
  author = {Daniel Nyga and Michael Beetz},
  booktitle = {International Symposium of Robotics Research (ISRR)},
  address = {Sestri Levante (Genoa), Italy},
  year = {2015},
  title = {{Cloud-based Probabilistic Knowledge Services for Instruction Interpretation}}
}

@inproceedings{nyga12actioncore,
  bib2html_domain = {Assistive Household},
  bib2html_rescat = {Representation, Reasoning},
  bib2html_funding = {CoTeSys, RoboHow},
  author = {Daniel Nyga and Michael Beetz},
  booktitle = {2012 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS)},
  address = {Vilamoura, Portugal},
  month = {October, 7--12},
  bib2html_pubtype = {Conference Paper},
  year = {2012},
  title = {Everything Robots Always Wanted to Know about Housework (But were afraid to ask)}
}

@inproceedings{lisca15osd,
  booktitle = {IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS)},
  author = {Gheorghe Lisca and Daniel Nyga and Ferenc B\'alint-Bencz\'edi and Hagen Langer and Michael Beetz},
  year = {2015},
  address = {Hamburg, Germany},
  title = {Towards Robots Conducting Chemical Experiments}
}

@inproceedings{nyga17prac-ie,
  bib2html_funding = {RoboHow,ACAT},
  author = {Daniel Nyga and Mareike Picklum and Sebastian Koralewski and Michael Beetz},
  booktitle = {International Conference on Robotics and Automation (ICRA)},
  address = {Singapore},
  note = {Accepted for publication},
  year = {2017},
  keywords = {openease_natural_language,openease_kbe_nl_understanding},
  title = {{Instruction Completion through Instance-based Learning and Semantic Analogical Reasoning}}
}

@inproceedings{nyga17nlobj,
  bib2html_funding = {RoboHow,ACAT},
  author = {Daniel Nyga and Mareike Picklum and Michael Beetz},
  booktitle = {International Conference on Robotics and Automation (ICRA)},
  address = {Singapore},
  note = {Accepted for publication},
  year = {2017},
  keywords = {openease_natural_language,openease_kbe_nl_understanding},
  title = {{What No Robot Has Seen Before -- Probabilistic Interpretation of Natural-language Object Descriptions}}
}

repository: danielnyga/prac

repo_name: danielnyga/prac


text:
SUMMARY = "Stream EDitor (text filtering utility)"
HOMEPAGE = "http://www.gnu.org/software/sed/"
LICENSE = "GPLv3+"
LIC_FILES_CHKSUM = "file://COPYING;md5=c678957b0c8e964aa6c70fd77641a71e \
                    file://sed/sed.h;beginline=1;endline=17;md5=8841c3ba72de6f3ac9657381b98a604e"
SECTION = "console/utils"

inherit debian-package
require recipes-debian/sources/sed.inc
#FILESPATH_append = ":${COREBASE}/meta/recipes-extended/sed/sed-4.2.2"
#FILESEXTRAPATHS_prepend := "${THISDIR}/sed:"

# source format is 3.0 (quilt) but there is no debian/patches
DEBIAN_QUILT_PATCHES = ""

inherit autotools texinfo update-alternatives gettext

EXTRA_OECONF = "--disable-acl"

do_install () {
	autotools_do_install
	install -d ${D}${base_bindir}
	if [ ! ${D}${bindir} -ef ${D}${base_bindir} ]; then
	    mv ${D}${bindir}/sed ${D}${base_bindir}/sed
	    rmdir ${D}${bindir}/
	fi
}

ALTERNATIVE_${PN} = "sed"
ALTERNATIVE_LINK_NAME[sed] = "${base_bindir}/sed"
ALTERNATIVE_PRIORITY = "100"

repository: meta-debian/meta-debian

repo_name: meta-debian/meta-debian

branch_name: refs/heads/warrior


text:
package reboot

import (
	"fmt"
	"log"
	"math/rand"
	"path"
	"runtime"
	"time"

	"github.com/75912001/xr/impl/service/common/bench"
	xrlog "github.com/75912001/xr/lib/log"
	"github.com/75912001/xr/lib/timer"
	"github.com/75912001/xr/lib/util"
)

var GRebootMgr RebootMgr

type RebootMgr struct {
	Log       xrlog.Log
	BenchMgr  bench.Mgr
	TimerMgr  timer.TimerMgr
	EventChan chan interface{}
}

func (p *RebootMgr) Init() (err error) {
	log.Printf("RebootMgr Init.")

	rand.Seed(time.Now().UnixNano())

	currentPath, err := util.GetCurrentPath()
	if err != nil {
		log.Fatalf("GetCurrentPath fatal:%v", err)
		return
	}
	log.Printf("current path:%v", currentPath)
	{ //加载bench.json文件
		err = p.BenchMgr.Parse(path.Join(currentPath, "bench.json"))
		if err != nil {
			log.Fatalf("parse bench.json err:%v", err)
			return
		}
		log.Printf("bench json:%+v", p.BenchMgr.Json)
	}
	{ //log
		err = p.Log.Init(p.BenchMgr.Json.Base.LogAbsPath, fmt.Sprintf("%v-%v",
			p.BenchMgr.Json.Base.ServiceName, p.BenchMgr.Json.Base.ServiceID))
		if err != nil {
			log.Fatalf("log init err:%v", err)
			return
		}
		p.Log.SetLevel(int(p.BenchMgr.Json.Base.LogLevel))
	}
	{ //runtime.GOMAXPROCS
		previousValue := runtime.GOMAXPROCS(int(p.BenchMgr.Json.Base.GoMaxProcs))
		p.Log.Info(fmt.Sprintf("go max procs new:%v, prviousValue:%v", p.BenchMgr.Json.Base.GoMaxProcs, previousValue))
	}
	//eventChan
	{
		p.EventChan = make(chan interface{}, p.BenchMgr.Json.Base.EventChanCnt)
		go func() {
			defer func() {
				if err := recover(); err != nil {
					p.Log.Warn(fmt.Sprintf("handle_event goroutine panic:%v", err))
				}
				p.Log.Trace("handle_event goroutine done.")
			}()
			p.handleEvent()
		}()
	}
	//timer
	{
		if 0 != p.BenchMgr.Json.Timer.ScanSecondDuration || 0 != p.BenchMgr.Json.Timer.ScanMillisecondDuration {
			p.TimerMgr.Start(p.BenchMgr.Json.Timer.ScanSecondDuration, p.BenchMgr.Json.Timer.ScanMillisecondDuration, p.EventChan)
		}
	}

	//加载bench.json文件中reboot自有field
	{
		currentPath, err := util.GetCurrentPath()
		if err != nil {
			p.Log.Crit("GetCurrentPath fatal:", err)
			return err
		}
		{
			err = util.UnmarshalJsonFile(path.Join(currentPath, "bench.json"), &GBench.Json)
			if err != nil {
				p.Log.Crit("parse bench.json err:", err)
				return err
			}
			p.Log.Info(fmt.Sprintf("bench json:%+v", GBench.Json))
		}
	}
	return
}


text:
# CMake generated Testfile for
# Source directory: F:/Projects (C++)/SD/SD/_libs/zlib-1.2.6
# Build directory: F:/Projects (C++)/SD/SD/_libs/zlib-1.2.6
#
# This file includes the relevent testing commands required for
# testing this directory and lists subdirectories to be tested as well.
ADD_TEST(example "example")
ADD_TEST(example64 "example64")

license: Zlib


text:
package log

import (
	"bytes"
	"errors"
	"testing"
)

const (
	newline = "\n"
)

func TestLogger(t *testing.T) {
	t.Run("Log should print to output", func(t *testing.T) {
		var b bytes.Buffer
		logger := New(&b)

		logger.Logf("test %d,%d,%d", 1, 2, 3)

		got := b.String()
		want := "test 1,2,3" + newline

		if got != want {
			t.Errorf("got %v want %v", got, want)
		}
	})

	t.Run("Info should not print to output by default", func(t *testing.T) {
		var b bytes.Buffer
		logger := New(&b)

		logger.SetInfo(false)
		logger.Infof("test %d,%d,%d", 1, 2, 3)

		got := b.String()
		want := ""

		if got != want {
			t.Errorf("got %v want %v", got, want)
		}
	})

	t.Run("Info should print to output by default if set", func(t *testing.T) {
		var b bytes.Buffer
		logger := New(&b)

		logger.SetInfo(true)
		logger.Infof("test %d,%d,%d", 1, 2, 3)

		got := b.String()
		want := ConsoleColors.Blue() + "test 1,2,3" + ConsoleColors.Reset() + newline

		if got != want {
			t.Errorf("got %v want %v", got, want)
		}
	})

	t.Run("Warn should not print to output by default", func(t *testing.T) {
		var b bytes.Buffer
		logger := New(&b)

		logger.Warnf("test %d,%d,%d", 1, 2, 3)

		got := b.String()
		want := ""

		if got != want {
			t.Errorf("got %v want %v", got, want)
		}
	})

	t.Run("Warn should print if set", func(t *testing.T) {
		var b bytes.Buffer
		logger := New(&b)

		logger.SetWarn(true)
		logger.Warnf("test %d,%d,%d", 1, 2, 3)

		got := b.String()
		want := ConsoleColors.Yellow() + "test 1,2,3" + ConsoleColors.Reset() + newline

		if got != want {
			t.Errorf("got %v want %v", got, want)
		}
	})

	t.Run("Debug should not print to output by default", func(t *testing.T) {
		var b bytes.Buffer
		logger := New(&b)

		logger.Debugf("test %d,%d,%d", 1, 2, 3)

		got := b.String()
		want := ""

		if got != want {
			t.Errorf("got %v want %v", got, want)
		}
	})

	t.Run("Debug should print if set", func(t *testing.T) {
		var b bytes.Buffer
		logger := New(&b)

		logger.SetDebug(true)
		logger.Debugf("test %d,%d,%d", 1, 2, 3)

		got := b.String()
		want := ConsoleColors.Cyan() + "test 1,2,3" + ConsoleColors.Reset() + newline

		if got != want {
			t.Errorf("got %v want %v", got, want)
		}
	})
}

func TestLoggerError(t *testing.T) {
	t.Run("Log Error should print error string to output", func(t *testing.T) {
		var b bytes.Buffer
		logger := New(&b)
		logger.SetError(true)

		logger.Error(errors.New("something wrong is happening"))

		got := b.String()
		want := ConsoleColors.Red() + "something wrong is happening" + ConsoleColors.Reset() + newline

		if got != want {
			t.Errorf("got %v want %v", got, want)
		}
	})

	t.Run("Log Errorf should print formatted string to output", func(t *testing.T) {
		var b bytes.Buffer
		logger := New(&b)
		logger.SetError(true)

		logger.Errorf("something %s is happening", "fishy")

		got := b.String()
		want := ConsoleColors.Red() + "something fishy is happening" + ConsoleColors.Reset() + newline

		if got != want {
			t.Errorf("got %v want %v", got, want)
		}
	})
}

repository: nanovms/ops

repo_name: nanovms/ops