diff --git a/dcu b/dcu index 485232e..4939718 100755 --- a/dcu +++ b/dcu @@ -1,10 +1,10 @@ #!/usr/bin/env bash -# This script was generated by bashly 1.2.1 (https://bashly.dannyb.co) +# This script was generated by bashly 1.3.6 (https://bashly.dev) # Modifying it manually is not recommended # :wrapper.bash3_bouncer -if [[ "${BASH_VERSINFO:-0}" -lt 4 ]]; then - printf "bash version 4 or higher is required\n" >&2 +if ((BASH_VERSINFO[0] < 4 || (BASH_VERSINFO[0] == 4 && BASH_VERSINFO[1] < 2))); then + printf "bash version 4.2 or higher is required\n" >&2 exit 1 fi @@ -33,7 +33,8 @@ dcu_usage() { echo # :command.long_usage - if [[ -n $long_usage ]]; then + if [[ -n "$long_usage" ]]; then + # :command.usage_options printf "%s\n" "Options:" # :command.usage_fixed_flags @@ -67,7 +68,8 @@ dcu_mac_usage() { echo # :command.long_usage - if [[ -n $long_usage ]]; then + if [[ -n "$long_usage" ]]; then + # :command.usage_options printf "%s\n" "Options:" # :command.usage_flags @@ -92,7 +94,7 @@ dcu_mac_usage() { # :command.usage_examples printf "%s\n" "Examples:" printf " dcu mac coreboot.rom --set AB:CD:EF:01:23:45\n" - printf " dcu mac coreboot.rom --get\n" + printf " dcu mac coreboot.rom\n" echo fi @@ -110,7 +112,8 @@ dcu_smbios_usage() { echo # :command.long_usage - if [[ -n $long_usage ]]; then + if [[ -n "$long_usage" ]]; then + # :command.usage_options printf "%s\n" "Options:" # :command.usage_flags @@ -159,7 +162,8 @@ dcu_logo_usage() { echo # :command.long_usage - if [[ -n $long_usage ]]; then + if [[ -n "$long_usage" ]]; then + # :command.usage_options printf "%s\n" "Options:" # :command.usage_flags @@ -201,7 +205,8 @@ dcu_variable_usage() { echo # :command.long_usage - if [[ -n $long_usage ]]; then + if [[ -n "$long_usage" ]]; then + # :command.usage_options printf "%s\n" "Options:" # :command.usage_flags @@ -286,6 +291,8 @@ normalize_input() { # :command.inspect_args inspect_args() { + local k + if ((${#args[@]})); then readarray -t sorted_keys < <(printf '%s\n' "${!args[@]}" | sort) echo args: @@ -296,15 +303,6 @@ inspect_args() { echo args: none fi - if ((${#other_args[@]})); then - echo - echo other_args: - echo "- \${other_args[*]} = ${other_args[*]}" - for i in "${!other_args[@]}"; do - echo "- \${other_args[$i]} = ${other_args[$i]}" - done - fi - if ((${#deps[@]})); then readarray -t sorted_keys < <(printf '%s\n' "${!deps[@]}" | sort) echo @@ -327,6 +325,7 @@ inspect_args() { # :command.command_functions # :command.function dcu_mac_command() { + # src/mac_command.sh # SPDX-FileCopyrightText: 2023 3mdeb # @@ -406,6 +405,7 @@ dcu_mac_command() { # :command.function dcu_smbios_command() { + # src/smbios_command.sh # SPDX-FileCopyrightText: 2023 3mdeb # @@ -495,6 +495,7 @@ dcu_smbios_command() { # :command.function dcu_logo_command() { + # src/logo_command.sh # SPDX-FileCopyrightText: 2023 3mdeb # @@ -545,6 +546,7 @@ dcu_logo_command() { # :command.function dcu_variable_command() { + # src/variable_command.sh # SPDX-FileCopyrightText: 2024 3mdeb # @@ -563,7 +565,22 @@ dcu_variable_command() { supported_variables=$(echo "LockBios NetworkBoot UsbDriverStack SmmBwp"\ "Ps2Controller BootManagerEnabled PCIeResizeableBarsEnabled"\ "EnableCamera EnableWifiBt SerialRedirection SerialRedirection2"\ - "MeMode FanCurveOption CpuThrottlingThreshold") + "MeMode FanCurveOption CpuThrottlingThreshold"\ + "UsbMassStorage QuietBoot FastBoot UsbPortPower DescriptorWriteable"\ + "PowerFailureState SleepType CpuThrottlingOffset DGPUState"\ + "SecureBootEnable BatteryConfig") + + guidof() + { + case $1 in + SecureBootEnable) + echo "f0a30bc7-af08-4556-99c4001009c93a44" + ;; + *) + echo "dasharo" + ;; + esac + } typeof() { @@ -580,7 +597,12 @@ dcu_variable_command() { |EnableCamera \ |EnableWifiBt \ |SerialRedirection \ - |SerialRedirection2) + |SerialRedirection2 \ + |QuietBoot \ + |FastBoot \ + |UsbPortPower \ + |DescriptorWriteable \ + |SecureBootEnable) echo "enum_bool" ;; MeMode) @@ -589,9 +611,22 @@ dcu_variable_command() { FanCurveOption) echo "enum_fancurve" ;; - CpuThrottlingThreshold) + CpuThrottlingThreshold \ + |CpuThrottlingOffset) echo "uint8" ;; + DGPUState) + echo "enum_dgpuenabled" + ;; + PowerFailureState) + echo "enum_powerfailure" + ;; + SleepType) + echo "enum_sleeptype" + ;; + BatteryConfig) + echo "uint16" + ;; *) echo "unknown" ;; @@ -602,7 +637,7 @@ dcu_variable_command() { { case `typeof $1` in enum_bool) - _result="$(${SMMSTORETOOL} "${DASHARO_ROM}" get -g dasharo -n $1 -t bool)" + _result="$(${SMMSTORETOOL} "${DASHARO_ROM}" get -g $(guidof $1) -n $1 -t bool)" error_check "Variable store was not initialized yet. You need to set some variable first via --set option." 17 if [ "${_result}" = "false" ]; then echo "Disabled" @@ -614,7 +649,7 @@ dcu_variable_command() { fi ;; enum_memode) - _result="$(${SMMSTORETOOL} "${DASHARO_ROM}" get -g dasharo -n $1 -t uint8)" + _result="$(${SMMSTORETOOL} "${DASHARO_ROM}" get -g $(guidof $1) -n $1 -t uint8)" error_check "Variable store was not initialized yet. You need to set some variable first via --set option." 17 if [ "${_result}" = "0" ]; then echo "Enabled" @@ -628,7 +663,7 @@ dcu_variable_command() { fi ;; enum_fancurve) - _result="$(${SMMSTORETOOL} "${DASHARO_ROM}" get -g dasharo -n $1 -t uint8)" + _result="$(${SMMSTORETOOL} "${DASHARO_ROM}" get -g $(guidof $1) -n $1 -t uint8)" error_check "Variable store was not initialized yet. You need to set some variable first via --set option." 17 if [ "${_result}" = "0" ]; then echo "Silent" @@ -639,8 +674,42 @@ dcu_variable_command() { exit 18 fi ;; + enum_dgpuenabled) + _result="$(${SMMSTORETOOL} "${DASHARO_ROM}" get -g $(guidof $1) -n $1 -t uint8)" + error_check "Variable store was not initialized yet. You need to set some variable first via --set option." 17 + case $_result in + 0) echo "iGPU Only";; + 1) echo "NVIDIA Optimus";; + 2) echo "dGPU Only";; + *) echo "Error!"; exit 18;; + esac + ;; + enum_powerfailure) + _result="$(${SMMSTORETOOL} "${DASHARO_ROM}" get -g $(guidof $1) -n $1 -t uint8)" + error_check "Variable store was not initialized yet. You need to set some variable first via --set option." 17 + case $_result in + 0) echo "Powered Off";; + 1) echo "Powered On";; + 2) echo "The state at the moment of power failure";; + *) echo "Error!"; exit 18;; + esac + ;; + enum_sleeptype) + _result="$(${SMMSTORETOOL} "${DASHARO_ROM}" get -g $(guidof $1) -n $1 -t uint8)" + error_check "Variable store was not initialized yet. You need to set some variable first via --set option." 17 + case $_result in + 0) echo "Suspend to Idle (S0ix)";; + 1) echo "Suspend to RAM (S3)";; + *) echo "Error!"; exit 18;; + esac + ;; uint8) - _result="$(${SMMSTORETOOL} "${DASHARO_ROM}" get -g dasharo -n $1 -t uint8)" + _result="$(${SMMSTORETOOL} "${DASHARO_ROM}" get -g $(guidof $1) -n $1 -t uint8)" + error_check "Variable store was not initialized yet. You need to set some variable first via --set option." 17 + echo ${_result} + ;; + uint16) + _result="$(${SMMSTORETOOL} "${DASHARO_ROM}" get -g $(guidof $1) -n $1 -t uint16)" error_check "Variable store was not initialized yet. You need to set some variable first via --set option." 17 echo ${_result} ;; @@ -663,9 +732,21 @@ dcu_variable_command() { enum_fancurve) echo "Silent / Performance" ;; + enum_dgpuenabled) + echo "iGPU Only / NVIDIA Optimus / dGPU Only" + ;; + enum_powerfailure) + echo "Powered Off / Powered On / The state at the moment of power failure" + ;; + enum_sleeptype) + echo "Suspend to Idle (S0ix) / Suspend to RAM (S3)" + ;; uint8) echo "0-255 (Actual supported values may vary)" ;; + uint16) + echo "0-65535 (Actual supported values may vary)" + ;; *) ;; esac @@ -720,14 +801,14 @@ dcu_variable_command() { set_type=$(typeof ${SET}) fi - ${SMMSTORETOOL} "${DASHARO_ROM}" set -g dasharo -n ${SET} -t ${set_type} -v ${set_value} + ${SMMSTORETOOL} "${DASHARO_ROM}" set -g $(guidof ${SET}) -n ${SET} -t ${set_type} -v ${set_value} echo "Successfully set variable ${SET} in the variable store." } list_variables() { echo "Settings in ${DASHARO_ROM}:" - variables=$(${SMMSTORETOOL} "${DASHARO_ROM}" list | grep "dasharo" | sed 's/.*://; s/(.*//') + variables=$(${SMMSTORETOOL} "${DASHARO_ROM}" list | grep -E "dasharo|f0a30bc7-af08-4556" | sed 's/.*://; s/(.*//') tabs 30 echo -e "NAME\tVALUE\tACCEPTED VALUES" for var in $variables; do @@ -735,7 +816,11 @@ dcu_variable_command() { enum_bool \ |enum_memode \ |enum_fancurve \ - |uint8) + |enum_dgpuenabled \ + |enum_powerfailure \ + |enum_sleeptype \ + |uint8 \ + |uint16) echo -e "$var\t$(valueof $var)\t$(acceptedvaluesfor $var)" ;; *) @@ -772,9 +857,12 @@ dcu_variable_command() { # :command.parse_requirements parse_requirements() { + local key + # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do - case "${1:-}" in + key="$1" + case "$key" in --version | -v) version_command exit @@ -794,51 +882,62 @@ parse_requirements() { done # :command.dependencies_filter - if command -v cbfstool >/dev/null 2>&1; then - deps['cbfstool']="$(command -v cbfstool | head -n1)" - else + missing_deps= + # :dependency.filter + if ! command -v cbfstool >/dev/null 2>&1; then printf "missing dependency: cbfstool\n" >&2 - printf "%s\n" "You can build one from source code: https://github.com/Dasharo/dcu#compiling-cbfstool or use DCU tool in container: https://github.com/Dasharo/dcu?tab=readme-ov-file#dasharo-configuration-container\n" >&2 - exit 1 + printf "%s\n\n" "You can build one from source code: https://github.com/Dasharo/dcu#compiling-cbfstool or use DCU tool in container: https://github.com/Dasharo/dcu?tab=readme-ov-file#dasharo-configuration-container\n" >&2 + missing_deps=1 + else + deps['cbfstool']="$(command -v cbfstool | head -n1)" fi - if command -v uuidparse >/dev/null 2>&1; then - deps['uuidparse']="$(command -v uuidparse | head -n1)" - else + # :dependency.filter + if ! command -v uuidparse >/dev/null 2>&1; then printf "missing dependency: uuidparse\n" >&2 - printf "%s\n" "Please install util-linux package" >&2 - exit 1 + printf "%s\n\n" "Please install util-linux package" >&2 + missing_deps=1 + else + deps['uuidparse']="$(command -v uuidparse | head -n1)" fi - if command -v convert >/dev/null 2>&1; then - deps['convert']="$(command -v convert | head -n1)" - else + # :dependency.filter + if ! command -v convert >/dev/null 2>&1; then printf "missing dependency: convert\n" >&2 - printf "%s\n" "Please install imagemagick package" >&2 - exit 1 + printf "%s\n\n" "Please install imagemagick package" >&2 + missing_deps=1 + else + deps['convert']="$(command -v convert | head -n1)" fi - if command -v smmstoretool >/dev/null 2>&1; then - deps['smmstoretool']="$(command -v smmstoretool | head -n1)" - else + # :dependency.filter + if ! command -v smmstoretool >/dev/null 2>&1; then printf "missing dependency: smmstoretool\n" >&2 - printf "%s\n" "You can build one from source code: https://github.com/Dasharo/dcu#compiling-smmstoretool or use DCU tool in container: https://github.com/Dasharo/dcu?tab=readme-ov-file#dasharo-configuration-container\n" >&2 - exit 1 + printf "%s\n\n" "You can build one from source code: https://github.com/Dasharo/dcu#compiling-smmstoretool or use DCU tool in container: https://github.com/Dasharo/dcu?tab=readme-ov-file#dasharo-configuration-container\n" >&2 + missing_deps=1 + else + deps['smmstoretool']="$(command -v smmstoretool | head -n1)" fi - if command -v nvm >/dev/null 2>&1; then - deps['nvmtool']="$(command -v nvm | head -n1)" - else + # :dependency.filter + if ! command -v nvm >/dev/null 2>&1; then printf "missing dependency: nvmtool\n" >&2 - printf "%s\n" "You can build one from source code: https://github.com/Dasharo/dcu#compiling-nvmtool or use DCU tool in container: https://github.com/Dasharo/dcu?tab=readme-ov-file#dasharo-configuration-container\n" >&2 - exit 1 + printf "%s\n\n" "You can build one from source code: https://github.com/Dasharo/dcu#compiling-nvmtool or use DCU tool in container: https://github.com/Dasharo/dcu?tab=readme-ov-file#dasharo-configuration-container\n" >&2 + missing_deps=1 + else + deps['nvmtool']="$(command -v nvm | head -n1)" fi - if command -v ifdtool >/dev/null 2>&1; then - deps['ifdtool']="$(command -v ifdtool | head -n1)" - else + # :dependency.filter + if ! command -v ifdtool >/dev/null 2>&1; then printf "missing dependency: ifdtool\n" >&2 - printf "%s\n" "You can build one from source code: https://github.com/Dasharo/dcu#compiling-nvmtool or use DCU tool in container: https://github.com/Dasharo/dcu?tab=readme-ov-file#dasharo-configuration-container\n" >&2 + printf "%s\n\n" "You can build one from source code: https://github.com/Dasharo/dcu#compiling-nvmtool or use DCU tool in container: https://github.com/Dasharo/dcu?tab=readme-ov-file#dasharo-configuration-container\n" >&2 + missing_deps=1 + else + deps['ifdtool']="$(command -v ifdtool | head -n1)" + fi + + if [[ -n $missing_deps ]]; then exit 1 fi @@ -914,9 +1013,12 @@ parse_requirements() { # :command.parse_requirements dcu_mac_parse_requirements() { + local key + # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do - case "${1:-}" in + key="$1" + case "$key" in --help | -h) long_usage=yes dcu_mac_usage @@ -984,9 +1086,12 @@ dcu_mac_parse_requirements() { # :command.parse_requirements dcu_smbios_parse_requirements() { + local key + # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do - case "${1:-}" in + key="$1" + case "$key" in --help | -h) long_usage=yes dcu_smbios_usage @@ -1068,9 +1173,12 @@ dcu_smbios_parse_requirements() { # :command.parse_requirements dcu_logo_parse_requirements() { + local key + # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do - case "${1:-}" in + key="$1" + case "$key" in --help | -h) long_usage=yes dcu_logo_usage @@ -1144,9 +1252,12 @@ dcu_logo_parse_requirements() { # :command.parse_requirements dcu_variable_parse_requirements() { + local key + # :command.fixed_flags_filter while [[ $# -gt 0 ]]; do - case "${1:-}" in + key="$1" + case "$key" in --help | -h) long_usage=yes dcu_variable_usage @@ -1258,8 +1369,7 @@ dcu_variable_parse_requirements() { # :command.initialize initialize() { - version="0.2.1" - long_usage='' + declare -g version="0.2.1" set -e # src/initialize.sh @@ -1293,11 +1403,13 @@ initialize() { # :command.run run() { - declare -A args=() - declare -A deps=() - declare -a other_args=() - declare -a env_var_names=() - declare -a input=() + # :command.globals + declare -g long_usage='' + declare -g -A args=() + declare -g -A deps=() + declare -g -a env_var_names=() + declare -g -a input=() + normalize_input "$@" parse_requirements "${input[@]}" @@ -1309,5 +1421,9 @@ run() { esac } -initialize -run "$@" +if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then + # :command.start + command_line_args=("$@") + initialize + run "${command_line_args[@]}" +fi diff --git a/src/variable_command.sh b/src/variable_command.sh index 2d491c2..78e9866 100644 --- a/src/variable_command.sh +++ b/src/variable_command.sh @@ -15,7 +15,22 @@ LIST_SUPPORTED="${args[--list-supported]}" supported_variables=$(echo "LockBios NetworkBoot UsbDriverStack SmmBwp"\ "Ps2Controller BootManagerEnabled PCIeResizeableBarsEnabled"\ "EnableCamera EnableWifiBt SerialRedirection SerialRedirection2"\ - "MeMode FanCurveOption CpuThrottlingThreshold DGPUEnabled") + "MeMode FanCurveOption CpuThrottlingThreshold"\ + "UsbMassStorage QuietBoot FastBoot UsbPortPower DescriptorWriteable"\ + "PowerFailureState SleepType CpuThrottlingOffset DGPUState"\ + "SecureBootEnable BatteryConfig") + +guidof() +{ + case $1 in + SecureBootEnable) + echo "f0a30bc7-af08-4556-99c4001009c93a44" + ;; + *) + echo "dasharo" + ;; + esac +} typeof() { @@ -32,7 +47,12 @@ typeof() |EnableCamera \ |EnableWifiBt \ |SerialRedirection \ - |SerialRedirection2) + |SerialRedirection2 \ + |QuietBoot \ + |FastBoot \ + |UsbPortPower \ + |DescriptorWriteable \ + |SecureBootEnable) echo "enum_bool" ;; MeMode) @@ -41,12 +61,22 @@ typeof() FanCurveOption) echo "enum_fancurve" ;; - CpuThrottlingThreshold) + CpuThrottlingThreshold \ + |CpuThrottlingOffset) echo "uint8" ;; - DGPUEnabled) + DGPUState) echo "enum_dgpuenabled" ;; + PowerFailureState) + echo "enum_powerfailure" + ;; + SleepType) + echo "enum_sleeptype" + ;; + BatteryConfig) + echo "uint16" + ;; *) echo "unknown" ;; @@ -57,7 +87,7 @@ valueof() { case `typeof $1` in enum_bool) - _result="$(${SMMSTORETOOL} "${DASHARO_ROM}" get -g dasharo -n $1 -t bool)" + _result="$(${SMMSTORETOOL} "${DASHARO_ROM}" get -g $(guidof $1) -n $1 -t bool)" error_check "Variable store was not initialized yet. You need to set some variable first via --set option." 17 if [ "${_result}" = "false" ]; then echo "Disabled" @@ -69,7 +99,7 @@ valueof() fi ;; enum_memode) - _result="$(${SMMSTORETOOL} "${DASHARO_ROM}" get -g dasharo -n $1 -t uint8)" + _result="$(${SMMSTORETOOL} "${DASHARO_ROM}" get -g $(guidof $1) -n $1 -t uint8)" error_check "Variable store was not initialized yet. You need to set some variable first via --set option." 17 if [ "${_result}" = "0" ]; then echo "Enabled" @@ -83,7 +113,7 @@ valueof() fi ;; enum_fancurve) - _result="$(${SMMSTORETOOL} "${DASHARO_ROM}" get -g dasharo -n $1 -t uint8)" + _result="$(${SMMSTORETOOL} "${DASHARO_ROM}" get -g $(guidof $1) -n $1 -t uint8)" error_check "Variable store was not initialized yet. You need to set some variable first via --set option." 17 if [ "${_result}" = "0" ]; then echo "Silent" @@ -95,7 +125,7 @@ valueof() fi ;; enum_dgpuenabled) - _result="$(${SMMSTORETOOL} "${DASHARO_ROM}" get -g dasharo -n $1 -t uint8)" + _result="$(${SMMSTORETOOL} "${DASHARO_ROM}" get -g $(guidof $1) -n $1 -t uint8)" error_check "Variable store was not initialized yet. You need to set some variable first via --set option." 17 case $_result in 0) echo "iGPU Only";; @@ -104,8 +134,32 @@ valueof() *) echo "Error!"; exit 18;; esac ;; + enum_powerfailure) + _result="$(${SMMSTORETOOL} "${DASHARO_ROM}" get -g $(guidof $1) -n $1 -t uint8)" + error_check "Variable store was not initialized yet. You need to set some variable first via --set option." 17 + case $_result in + 0) echo "Powered Off";; + 1) echo "Powered On";; + 2) echo "The state at the moment of power failure";; + *) echo "Error!"; exit 18;; + esac + ;; + enum_sleeptype) + _result="$(${SMMSTORETOOL} "${DASHARO_ROM}" get -g $(guidof $1) -n $1 -t uint8)" + error_check "Variable store was not initialized yet. You need to set some variable first via --set option." 17 + case $_result in + 0) echo "Suspend to Idle (S0ix)";; + 1) echo "Suspend to RAM (S3)";; + *) echo "Error!"; exit 18;; + esac + ;; uint8) - _result="$(${SMMSTORETOOL} "${DASHARO_ROM}" get -g dasharo -n $1 -t uint8)" + _result="$(${SMMSTORETOOL} "${DASHARO_ROM}" get -g $(guidof $1) -n $1 -t uint8)" + error_check "Variable store was not initialized yet. You need to set some variable first via --set option." 17 + echo ${_result} + ;; + uint16) + _result="$(${SMMSTORETOOL} "${DASHARO_ROM}" get -g $(guidof $1) -n $1 -t uint16)" error_check "Variable store was not initialized yet. You need to set some variable first via --set option." 17 echo ${_result} ;; @@ -131,9 +185,18 @@ acceptedvaluesfor() enum_dgpuenabled) echo "iGPU Only / NVIDIA Optimus / dGPU Only" ;; + enum_powerfailure) + echo "Powered Off / Powered On / The state at the moment of power failure" + ;; + enum_sleeptype) + echo "Suspend to Idle (S0ix) / Suspend to RAM (S3)" + ;; uint8) echo "0-255 (Actual supported values may vary)" ;; + uint16) + echo "0-65535 (Actual supported values may vary)" + ;; *) ;; esac @@ -188,14 +251,14 @@ set_variable() set_type=$(typeof ${SET}) fi - ${SMMSTORETOOL} "${DASHARO_ROM}" set -g dasharo -n ${SET} -t ${set_type} -v ${set_value} + ${SMMSTORETOOL} "${DASHARO_ROM}" set -g $(guidof ${SET}) -n ${SET} -t ${set_type} -v ${set_value} echo "Successfully set variable ${SET} in the variable store." } list_variables() { echo "Settings in ${DASHARO_ROM}:" - variables=$(${SMMSTORETOOL} "${DASHARO_ROM}" list | grep "dasharo" | sed 's/.*://; s/(.*//') + variables=$(${SMMSTORETOOL} "${DASHARO_ROM}" list | grep -E "dasharo|f0a30bc7-af08-4556" | sed 's/.*://; s/(.*//') tabs 30 echo -e "NAME\tVALUE\tACCEPTED VALUES" for var in $variables; do @@ -204,7 +267,10 @@ list_variables() |enum_memode \ |enum_fancurve \ |enum_dgpuenabled \ - |uint8) + |enum_powerfailure \ + |enum_sleeptype \ + |uint8 \ + |uint16) echo -e "$var\t$(valueof $var)\t$(acceptedvaluesfor $var)" ;; *) diff --git a/test/approvals/_dcuc_help b/test/approvals/_dcuc_help index 1df10a4..19ee8d3 100644 --- a/test/approvals/_dcuc_help +++ b/test/approvals/_dcuc_help @@ -23,3 +23,4 @@ Examples: dcu smbios coreboot.rom -u 96bcfa1a-42b4-6717-a44c-d8bbc18cbea4 -s D07229051 dcu logo coreboot.rom -l bootsplash.bmp dcu variable coreboot.rom --get EnableWifiBt + diff --git a/test/approvals/_dcuc_variable_data_work_BatteryConfig4200_novacustom_nv4x_adl_v1_6_0_rom_get_BatteryConfig b/test/approvals/_dcuc_variable_data_work_BatteryConfig4200_novacustom_nv4x_adl_v1_6_0_rom_get_BatteryConfig new file mode 100644 index 0000000..225f7b3 --- /dev/null +++ b/test/approvals/_dcuc_variable_data_work_BatteryConfig4200_novacustom_nv4x_adl_v1_6_0_rom_get_BatteryConfig @@ -0,0 +1 @@ +4200 diff --git a/test/approvals/_dcuc_variable_data_work_BatteryConfig4200_novacustom_nv4x_adl_v1_6_0_rom_set_BatteryConfig_value_4200 b/test/approvals/_dcuc_variable_data_work_BatteryConfig4200_novacustom_nv4x_adl_v1_6_0_rom_set_BatteryConfig_value_4200 new file mode 100644 index 0000000..2106491 --- /dev/null +++ b/test/approvals/_dcuc_variable_data_work_BatteryConfig4200_novacustom_nv4x_adl_v1_6_0_rom_set_BatteryConfig_value_4200 @@ -0,0 +1 @@ +Successfully set variable BatteryConfig in the variable store. diff --git a/test/approvals/_dcuc_variable_data_work_CpuThrottlingOffset10_novacustom_nv4x_adl_v1_6_0_rom_get_CpuThrottlingOffset b/test/approvals/_dcuc_variable_data_work_CpuThrottlingOffset10_novacustom_nv4x_adl_v1_6_0_rom_get_CpuThrottlingOffset new file mode 100644 index 0000000..f599e28 --- /dev/null +++ b/test/approvals/_dcuc_variable_data_work_CpuThrottlingOffset10_novacustom_nv4x_adl_v1_6_0_rom_get_CpuThrottlingOffset @@ -0,0 +1 @@ +10 diff --git a/test/approvals/_dcuc_variable_data_work_CpuThrottlingOffset10_novacustom_nv4x_adl_v1_6_0_rom_set_CpuThrottlingOffset_value_10 b/test/approvals/_dcuc_variable_data_work_CpuThrottlingOffset10_novacustom_nv4x_adl_v1_6_0_rom_set_CpuThrottlingOffset_value_10 new file mode 100644 index 0000000..f099be1 --- /dev/null +++ b/test/approvals/_dcuc_variable_data_work_CpuThrottlingOffset10_novacustom_nv4x_adl_v1_6_0_rom_set_CpuThrottlingOffset_value_10 @@ -0,0 +1 @@ +Successfully set variable CpuThrottlingOffset in the variable store. diff --git a/test/approvals/_dcuc_variable_data_work_DGPUStateNVIDIAOptimus_novacustom_nv4x_adl_v1_6_0_rom_get_DGPUState b/test/approvals/_dcuc_variable_data_work_DGPUStateNVIDIAOptimus_novacustom_nv4x_adl_v1_6_0_rom_get_DGPUState new file mode 100644 index 0000000..d32954e --- /dev/null +++ b/test/approvals/_dcuc_variable_data_work_DGPUStateNVIDIAOptimus_novacustom_nv4x_adl_v1_6_0_rom_get_DGPUState @@ -0,0 +1 @@ +NVIDIA Optimus diff --git a/test/approvals/_dcuc_variable_data_work_DGPUStateNVIDIAOptimus_novacustom_nv4x_adl_v1_6_0_rom_set_DGPUState_value_NVIDIA_Optimus_ b/test/approvals/_dcuc_variable_data_work_DGPUStateNVIDIAOptimus_novacustom_nv4x_adl_v1_6_0_rom_set_DGPUState_value_NVIDIA_Optimus_ new file mode 100644 index 0000000..555ae5b --- /dev/null +++ b/test/approvals/_dcuc_variable_data_work_DGPUStateNVIDIAOptimus_novacustom_nv4x_adl_v1_6_0_rom_set_DGPUState_value_NVIDIA_Optimus_ @@ -0,0 +1 @@ +Successfully set variable DGPUState in the variable store. diff --git a/test/approvals/_dcuc_variable_data_work_DGPUStatedGPUOnly_novacustom_nv4x_adl_v1_6_0_rom_get_DGPUState b/test/approvals/_dcuc_variable_data_work_DGPUStatedGPUOnly_novacustom_nv4x_adl_v1_6_0_rom_get_DGPUState new file mode 100644 index 0000000..cc04c39 --- /dev/null +++ b/test/approvals/_dcuc_variable_data_work_DGPUStatedGPUOnly_novacustom_nv4x_adl_v1_6_0_rom_get_DGPUState @@ -0,0 +1 @@ +dGPU Only diff --git a/test/approvals/_dcuc_variable_data_work_DGPUStatedGPUOnly_novacustom_nv4x_adl_v1_6_0_rom_set_DGPUState_value_dGPU_Only_ b/test/approvals/_dcuc_variable_data_work_DGPUStatedGPUOnly_novacustom_nv4x_adl_v1_6_0_rom_set_DGPUState_value_dGPU_Only_ new file mode 100644 index 0000000..555ae5b --- /dev/null +++ b/test/approvals/_dcuc_variable_data_work_DGPUStatedGPUOnly_novacustom_nv4x_adl_v1_6_0_rom_set_DGPUState_value_dGPU_Only_ @@ -0,0 +1 @@ +Successfully set variable DGPUState in the variable store. diff --git a/test/approvals/_dcuc_variable_data_work_DGPUStateiGPUOnly_novacustom_nv4x_adl_v1_6_0_rom_get_DGPUState b/test/approvals/_dcuc_variable_data_work_DGPUStateiGPUOnly_novacustom_nv4x_adl_v1_6_0_rom_get_DGPUState new file mode 100644 index 0000000..862ea11 --- /dev/null +++ b/test/approvals/_dcuc_variable_data_work_DGPUStateiGPUOnly_novacustom_nv4x_adl_v1_6_0_rom_get_DGPUState @@ -0,0 +1 @@ +iGPU Only diff --git a/test/approvals/_dcuc_variable_data_work_DGPUStateiGPUOnly_novacustom_nv4x_adl_v1_6_0_rom_set_DGPUState_value_InvalidValue b/test/approvals/_dcuc_variable_data_work_DGPUStateiGPUOnly_novacustom_nv4x_adl_v1_6_0_rom_set_DGPUState_value_InvalidValue new file mode 100644 index 0000000..8ebf529 --- /dev/null +++ b/test/approvals/_dcuc_variable_data_work_DGPUStateiGPUOnly_novacustom_nv4x_adl_v1_6_0_rom_set_DGPUState_value_InvalidValue @@ -0,0 +1 @@ +Value InvalidValue is out of range (expected one of: iGPU Only / NVIDIA Optimus / dGPU Only) diff --git a/test/approvals/_dcuc_variable_data_work_DGPUStateiGPUOnly_novacustom_nv4x_adl_v1_6_0_rom_set_DGPUState_value_iGPU_Only_ b/test/approvals/_dcuc_variable_data_work_DGPUStateiGPUOnly_novacustom_nv4x_adl_v1_6_0_rom_set_DGPUState_value_iGPU_Only_ new file mode 100644 index 0000000..555ae5b --- /dev/null +++ b/test/approvals/_dcuc_variable_data_work_DGPUStateiGPUOnly_novacustom_nv4x_adl_v1_6_0_rom_set_DGPUState_value_iGPU_Only_ @@ -0,0 +1 @@ +Successfully set variable DGPUState in the variable store. diff --git a/test/approvals/_dcuc_variable_data_work_DescriptorWriteableDisabled_novacustom_nv4x_adl_v1_6_0_rom_get_DescriptorWriteable b/test/approvals/_dcuc_variable_data_work_DescriptorWriteableDisabled_novacustom_nv4x_adl_v1_6_0_rom_get_DescriptorWriteable new file mode 100644 index 0000000..44f03f1 --- /dev/null +++ b/test/approvals/_dcuc_variable_data_work_DescriptorWriteableDisabled_novacustom_nv4x_adl_v1_6_0_rom_get_DescriptorWriteable @@ -0,0 +1 @@ +Disabled diff --git a/test/approvals/_dcuc_variable_data_work_DescriptorWriteableDisabled_novacustom_nv4x_adl_v1_6_0_rom_set_DescriptorWriteable_value_Disabled b/test/approvals/_dcuc_variable_data_work_DescriptorWriteableDisabled_novacustom_nv4x_adl_v1_6_0_rom_set_DescriptorWriteable_value_Disabled new file mode 100644 index 0000000..1393c7f --- /dev/null +++ b/test/approvals/_dcuc_variable_data_work_DescriptorWriteableDisabled_novacustom_nv4x_adl_v1_6_0_rom_set_DescriptorWriteable_value_Disabled @@ -0,0 +1 @@ +Successfully set variable DescriptorWriteable in the variable store. diff --git a/test/approvals/_dcuc_variable_data_work_DescriptorWriteableEnabled_novacustom_nv4x_adl_v1_6_0_rom_get_DescriptorWriteable b/test/approvals/_dcuc_variable_data_work_DescriptorWriteableEnabled_novacustom_nv4x_adl_v1_6_0_rom_get_DescriptorWriteable new file mode 100644 index 0000000..caadf98 --- /dev/null +++ b/test/approvals/_dcuc_variable_data_work_DescriptorWriteableEnabled_novacustom_nv4x_adl_v1_6_0_rom_get_DescriptorWriteable @@ -0,0 +1 @@ +Enabled diff --git a/test/approvals/_dcuc_variable_data_work_DescriptorWriteableEnabled_novacustom_nv4x_adl_v1_6_0_rom_set_DescriptorWriteable_value_Enabled b/test/approvals/_dcuc_variable_data_work_DescriptorWriteableEnabled_novacustom_nv4x_adl_v1_6_0_rom_set_DescriptorWriteable_value_Enabled new file mode 100644 index 0000000..1393c7f --- /dev/null +++ b/test/approvals/_dcuc_variable_data_work_DescriptorWriteableEnabled_novacustom_nv4x_adl_v1_6_0_rom_set_DescriptorWriteable_value_Enabled @@ -0,0 +1 @@ +Successfully set variable DescriptorWriteable in the variable store. diff --git a/test/approvals/_dcuc_variable_data_work_DescriptorWriteableEnabled_novacustom_nv4x_adl_v1_6_0_rom_set_DescriptorWriteable_value_InvalidValue b/test/approvals/_dcuc_variable_data_work_DescriptorWriteableEnabled_novacustom_nv4x_adl_v1_6_0_rom_set_DescriptorWriteable_value_InvalidValue new file mode 100644 index 0000000..c541bc1 --- /dev/null +++ b/test/approvals/_dcuc_variable_data_work_DescriptorWriteableEnabled_novacustom_nv4x_adl_v1_6_0_rom_set_DescriptorWriteable_value_InvalidValue @@ -0,0 +1 @@ +Value InvalidValue is out of range (expected one of: Disabled / Enabled) diff --git a/test/approvals/_dcuc_variable_data_work_FastBootDisabled_novacustom_nv4x_adl_v1_6_0_rom_get_FastBoot b/test/approvals/_dcuc_variable_data_work_FastBootDisabled_novacustom_nv4x_adl_v1_6_0_rom_get_FastBoot new file mode 100644 index 0000000..44f03f1 --- /dev/null +++ b/test/approvals/_dcuc_variable_data_work_FastBootDisabled_novacustom_nv4x_adl_v1_6_0_rom_get_FastBoot @@ -0,0 +1 @@ +Disabled diff --git a/test/approvals/_dcuc_variable_data_work_FastBootDisabled_novacustom_nv4x_adl_v1_6_0_rom_set_FastBoot_value_Disabled b/test/approvals/_dcuc_variable_data_work_FastBootDisabled_novacustom_nv4x_adl_v1_6_0_rom_set_FastBoot_value_Disabled new file mode 100644 index 0000000..7a5f8a0 --- /dev/null +++ b/test/approvals/_dcuc_variable_data_work_FastBootDisabled_novacustom_nv4x_adl_v1_6_0_rom_set_FastBoot_value_Disabled @@ -0,0 +1 @@ +Successfully set variable FastBoot in the variable store. diff --git a/test/approvals/_dcuc_variable_data_work_FastBootEnabled_novacustom_nv4x_adl_v1_6_0_rom_get_FastBoot b/test/approvals/_dcuc_variable_data_work_FastBootEnabled_novacustom_nv4x_adl_v1_6_0_rom_get_FastBoot new file mode 100644 index 0000000..caadf98 --- /dev/null +++ b/test/approvals/_dcuc_variable_data_work_FastBootEnabled_novacustom_nv4x_adl_v1_6_0_rom_get_FastBoot @@ -0,0 +1 @@ +Enabled diff --git a/test/approvals/_dcuc_variable_data_work_FastBootEnabled_novacustom_nv4x_adl_v1_6_0_rom_set_FastBoot_value_Enabled b/test/approvals/_dcuc_variable_data_work_FastBootEnabled_novacustom_nv4x_adl_v1_6_0_rom_set_FastBoot_value_Enabled new file mode 100644 index 0000000..7a5f8a0 --- /dev/null +++ b/test/approvals/_dcuc_variable_data_work_FastBootEnabled_novacustom_nv4x_adl_v1_6_0_rom_set_FastBoot_value_Enabled @@ -0,0 +1 @@ +Successfully set variable FastBoot in the variable store. diff --git a/test/approvals/_dcuc_variable_data_work_FastBootEnabled_novacustom_nv4x_adl_v1_6_0_rom_set_FastBoot_value_InvalidValue b/test/approvals/_dcuc_variable_data_work_FastBootEnabled_novacustom_nv4x_adl_v1_6_0_rom_set_FastBoot_value_InvalidValue new file mode 100644 index 0000000..c541bc1 --- /dev/null +++ b/test/approvals/_dcuc_variable_data_work_FastBootEnabled_novacustom_nv4x_adl_v1_6_0_rom_set_FastBoot_value_InvalidValue @@ -0,0 +1 @@ +Value InvalidValue is out of range (expected one of: Disabled / Enabled) diff --git a/test/approvals/_dcuc_variable_data_work_PowerFailureStateKeep_novacustom_nv4x_adl_v1_6_0_rom_get_PowerFailureState b/test/approvals/_dcuc_variable_data_work_PowerFailureStateKeep_novacustom_nv4x_adl_v1_6_0_rom_get_PowerFailureState new file mode 100644 index 0000000..7c7e459 --- /dev/null +++ b/test/approvals/_dcuc_variable_data_work_PowerFailureStateKeep_novacustom_nv4x_adl_v1_6_0_rom_get_PowerFailureState @@ -0,0 +1 @@ +The state at the moment of power failure diff --git a/test/approvals/_dcuc_variable_data_work_PowerFailureStateKeep_novacustom_nv4x_adl_v1_6_0_rom_set_PowerFailureState_value_InvalidMode b/test/approvals/_dcuc_variable_data_work_PowerFailureStateKeep_novacustom_nv4x_adl_v1_6_0_rom_set_PowerFailureState_value_InvalidMode new file mode 100644 index 0000000..8677c90 --- /dev/null +++ b/test/approvals/_dcuc_variable_data_work_PowerFailureStateKeep_novacustom_nv4x_adl_v1_6_0_rom_set_PowerFailureState_value_InvalidMode @@ -0,0 +1 @@ +Value InvalidMode is out of range (expected one of: Powered Off / Powered On / The state at the moment of power failure) diff --git a/test/approvals/_dcuc_variable_data_work_PowerFailureStateKeep_novacustom_nv4x_adl_v1_6_0_rom_set_PowerFailureState_value_The_state_at_the_moment_of_power_failure_ b/test/approvals/_dcuc_variable_data_work_PowerFailureStateKeep_novacustom_nv4x_adl_v1_6_0_rom_set_PowerFailureState_value_The_state_at_the_moment_of_power_failure_ new file mode 100644 index 0000000..6f5416e --- /dev/null +++ b/test/approvals/_dcuc_variable_data_work_PowerFailureStateKeep_novacustom_nv4x_adl_v1_6_0_rom_set_PowerFailureState_value_The_state_at_the_moment_of_power_failure_ @@ -0,0 +1 @@ +Successfully set variable PowerFailureState in the variable store. diff --git a/test/approvals/_dcuc_variable_data_work_PowerFailureStatePoweredOff_novacustom_nv4x_adl_v1_6_0_rom_get_PowerFailureState b/test/approvals/_dcuc_variable_data_work_PowerFailureStatePoweredOff_novacustom_nv4x_adl_v1_6_0_rom_get_PowerFailureState new file mode 100644 index 0000000..3aefdd6 --- /dev/null +++ b/test/approvals/_dcuc_variable_data_work_PowerFailureStatePoweredOff_novacustom_nv4x_adl_v1_6_0_rom_get_PowerFailureState @@ -0,0 +1 @@ +Powered Off diff --git a/test/approvals/_dcuc_variable_data_work_PowerFailureStatePoweredOff_novacustom_nv4x_adl_v1_6_0_rom_set_PowerFailureState_value_Powered_Off_ b/test/approvals/_dcuc_variable_data_work_PowerFailureStatePoweredOff_novacustom_nv4x_adl_v1_6_0_rom_set_PowerFailureState_value_Powered_Off_ new file mode 100644 index 0000000..6f5416e --- /dev/null +++ b/test/approvals/_dcuc_variable_data_work_PowerFailureStatePoweredOff_novacustom_nv4x_adl_v1_6_0_rom_set_PowerFailureState_value_Powered_Off_ @@ -0,0 +1 @@ +Successfully set variable PowerFailureState in the variable store. diff --git a/test/approvals/_dcuc_variable_data_work_PowerFailureStatePoweredOn_novacustom_nv4x_adl_v1_6_0_rom_get_PowerFailureState b/test/approvals/_dcuc_variable_data_work_PowerFailureStatePoweredOn_novacustom_nv4x_adl_v1_6_0_rom_get_PowerFailureState new file mode 100644 index 0000000..0e4ca01 --- /dev/null +++ b/test/approvals/_dcuc_variable_data_work_PowerFailureStatePoweredOn_novacustom_nv4x_adl_v1_6_0_rom_get_PowerFailureState @@ -0,0 +1 @@ +Powered On diff --git a/test/approvals/_dcuc_variable_data_work_PowerFailureStatePoweredOn_novacustom_nv4x_adl_v1_6_0_rom_set_PowerFailureState_value_Powered_On_ b/test/approvals/_dcuc_variable_data_work_PowerFailureStatePoweredOn_novacustom_nv4x_adl_v1_6_0_rom_set_PowerFailureState_value_Powered_On_ new file mode 100644 index 0000000..6f5416e --- /dev/null +++ b/test/approvals/_dcuc_variable_data_work_PowerFailureStatePoweredOn_novacustom_nv4x_adl_v1_6_0_rom_set_PowerFailureState_value_Powered_On_ @@ -0,0 +1 @@ +Successfully set variable PowerFailureState in the variable store. diff --git a/test/approvals/_dcuc_variable_data_work_QuietBootDisabled_novacustom_nv4x_adl_v1_6_0_rom_get_QuietBoot b/test/approvals/_dcuc_variable_data_work_QuietBootDisabled_novacustom_nv4x_adl_v1_6_0_rom_get_QuietBoot new file mode 100644 index 0000000..44f03f1 --- /dev/null +++ b/test/approvals/_dcuc_variable_data_work_QuietBootDisabled_novacustom_nv4x_adl_v1_6_0_rom_get_QuietBoot @@ -0,0 +1 @@ +Disabled diff --git a/test/approvals/_dcuc_variable_data_work_QuietBootDisabled_novacustom_nv4x_adl_v1_6_0_rom_set_QuietBoot_value_Disabled b/test/approvals/_dcuc_variable_data_work_QuietBootDisabled_novacustom_nv4x_adl_v1_6_0_rom_set_QuietBoot_value_Disabled new file mode 100644 index 0000000..418c271 --- /dev/null +++ b/test/approvals/_dcuc_variable_data_work_QuietBootDisabled_novacustom_nv4x_adl_v1_6_0_rom_set_QuietBoot_value_Disabled @@ -0,0 +1 @@ +Successfully set variable QuietBoot in the variable store. diff --git a/test/approvals/_dcuc_variable_data_work_QuietBootEnabled_novacustom_nv4x_adl_v1_6_0_rom_get_QuietBoot b/test/approvals/_dcuc_variable_data_work_QuietBootEnabled_novacustom_nv4x_adl_v1_6_0_rom_get_QuietBoot new file mode 100644 index 0000000..caadf98 --- /dev/null +++ b/test/approvals/_dcuc_variable_data_work_QuietBootEnabled_novacustom_nv4x_adl_v1_6_0_rom_get_QuietBoot @@ -0,0 +1 @@ +Enabled diff --git a/test/approvals/_dcuc_variable_data_work_QuietBootEnabled_novacustom_nv4x_adl_v1_6_0_rom_set_QuietBoot_value_Enabled b/test/approvals/_dcuc_variable_data_work_QuietBootEnabled_novacustom_nv4x_adl_v1_6_0_rom_set_QuietBoot_value_Enabled new file mode 100644 index 0000000..418c271 --- /dev/null +++ b/test/approvals/_dcuc_variable_data_work_QuietBootEnabled_novacustom_nv4x_adl_v1_6_0_rom_set_QuietBoot_value_Enabled @@ -0,0 +1 @@ +Successfully set variable QuietBoot in the variable store. diff --git a/test/approvals/_dcuc_variable_data_work_QuietBootEnabled_novacustom_nv4x_adl_v1_6_0_rom_set_QuietBoot_value_InvalidValue b/test/approvals/_dcuc_variable_data_work_QuietBootEnabled_novacustom_nv4x_adl_v1_6_0_rom_set_QuietBoot_value_InvalidValue new file mode 100644 index 0000000..c541bc1 --- /dev/null +++ b/test/approvals/_dcuc_variable_data_work_QuietBootEnabled_novacustom_nv4x_adl_v1_6_0_rom_set_QuietBoot_value_InvalidValue @@ -0,0 +1 @@ +Value InvalidValue is out of range (expected one of: Disabled / Enabled) diff --git a/test/approvals/_dcuc_variable_data_work_SecureBootEnableDisabled_novacustom_nv4x_adl_v1_6_0_rom_get_SecureBootEnable b/test/approvals/_dcuc_variable_data_work_SecureBootEnableDisabled_novacustom_nv4x_adl_v1_6_0_rom_get_SecureBootEnable new file mode 100644 index 0000000..44f03f1 --- /dev/null +++ b/test/approvals/_dcuc_variable_data_work_SecureBootEnableDisabled_novacustom_nv4x_adl_v1_6_0_rom_get_SecureBootEnable @@ -0,0 +1 @@ +Disabled diff --git a/test/approvals/_dcuc_variable_data_work_SecureBootEnableDisabled_novacustom_nv4x_adl_v1_6_0_rom_set_SecureBootEnable_value_Disabled b/test/approvals/_dcuc_variable_data_work_SecureBootEnableDisabled_novacustom_nv4x_adl_v1_6_0_rom_set_SecureBootEnable_value_Disabled new file mode 100644 index 0000000..7f479ee --- /dev/null +++ b/test/approvals/_dcuc_variable_data_work_SecureBootEnableDisabled_novacustom_nv4x_adl_v1_6_0_rom_set_SecureBootEnable_value_Disabled @@ -0,0 +1 @@ +Successfully set variable SecureBootEnable in the variable store. diff --git a/test/approvals/_dcuc_variable_data_work_SecureBootEnableEnabled_novacustom_nv4x_adl_v1_6_0_rom_get_SecureBootEnable b/test/approvals/_dcuc_variable_data_work_SecureBootEnableEnabled_novacustom_nv4x_adl_v1_6_0_rom_get_SecureBootEnable new file mode 100644 index 0000000..caadf98 --- /dev/null +++ b/test/approvals/_dcuc_variable_data_work_SecureBootEnableEnabled_novacustom_nv4x_adl_v1_6_0_rom_get_SecureBootEnable @@ -0,0 +1 @@ +Enabled diff --git a/test/approvals/_dcuc_variable_data_work_SecureBootEnableEnabled_novacustom_nv4x_adl_v1_6_0_rom_set_SecureBootEnable_value_Enabled b/test/approvals/_dcuc_variable_data_work_SecureBootEnableEnabled_novacustom_nv4x_adl_v1_6_0_rom_set_SecureBootEnable_value_Enabled new file mode 100644 index 0000000..7f479ee --- /dev/null +++ b/test/approvals/_dcuc_variable_data_work_SecureBootEnableEnabled_novacustom_nv4x_adl_v1_6_0_rom_set_SecureBootEnable_value_Enabled @@ -0,0 +1 @@ +Successfully set variable SecureBootEnable in the variable store. diff --git a/test/approvals/_dcuc_variable_data_work_SecureBootEnableEnabled_novacustom_nv4x_adl_v1_6_0_rom_set_SecureBootEnable_value_InvalidValue b/test/approvals/_dcuc_variable_data_work_SecureBootEnableEnabled_novacustom_nv4x_adl_v1_6_0_rom_set_SecureBootEnable_value_InvalidValue new file mode 100644 index 0000000..c541bc1 --- /dev/null +++ b/test/approvals/_dcuc_variable_data_work_SecureBootEnableEnabled_novacustom_nv4x_adl_v1_6_0_rom_set_SecureBootEnable_value_InvalidValue @@ -0,0 +1 @@ +Value InvalidValue is out of range (expected one of: Disabled / Enabled) diff --git a/test/approvals/_dcuc_variable_data_work_SleepTypeS0ix_novacustom_nv4x_adl_v1_6_0_rom_get_SleepType b/test/approvals/_dcuc_variable_data_work_SleepTypeS0ix_novacustom_nv4x_adl_v1_6_0_rom_get_SleepType new file mode 100644 index 0000000..f97337d --- /dev/null +++ b/test/approvals/_dcuc_variable_data_work_SleepTypeS0ix_novacustom_nv4x_adl_v1_6_0_rom_get_SleepType @@ -0,0 +1 @@ +Suspend to Idle (S0ix) diff --git a/test/approvals/_dcuc_variable_data_work_SleepTypeS0ix_novacustom_nv4x_adl_v1_6_0_rom_set_SleepType_value_Suspend_to_Idle_S0ix_ b/test/approvals/_dcuc_variable_data_work_SleepTypeS0ix_novacustom_nv4x_adl_v1_6_0_rom_set_SleepType_value_Suspend_to_Idle_S0ix_ new file mode 100644 index 0000000..74214e6 --- /dev/null +++ b/test/approvals/_dcuc_variable_data_work_SleepTypeS0ix_novacustom_nv4x_adl_v1_6_0_rom_set_SleepType_value_Suspend_to_Idle_S0ix_ @@ -0,0 +1 @@ +Successfully set variable SleepType in the variable store. diff --git a/test/approvals/_dcuc_variable_data_work_SleepTypeS3_novacustom_nv4x_adl_v1_6_0_rom_get_SleepType b/test/approvals/_dcuc_variable_data_work_SleepTypeS3_novacustom_nv4x_adl_v1_6_0_rom_get_SleepType new file mode 100644 index 0000000..a35f10f --- /dev/null +++ b/test/approvals/_dcuc_variable_data_work_SleepTypeS3_novacustom_nv4x_adl_v1_6_0_rom_get_SleepType @@ -0,0 +1 @@ +Suspend to RAM (S3) diff --git a/test/approvals/_dcuc_variable_data_work_SleepTypeS3_novacustom_nv4x_adl_v1_6_0_rom_set_SleepType_value_InvalidMode b/test/approvals/_dcuc_variable_data_work_SleepTypeS3_novacustom_nv4x_adl_v1_6_0_rom_set_SleepType_value_InvalidMode new file mode 100644 index 0000000..00bae6c --- /dev/null +++ b/test/approvals/_dcuc_variable_data_work_SleepTypeS3_novacustom_nv4x_adl_v1_6_0_rom_set_SleepType_value_InvalidMode @@ -0,0 +1 @@ +Value InvalidMode is out of range (expected one of: Suspend to Idle (S0ix) / Suspend to RAM (S3)) diff --git a/test/approvals/_dcuc_variable_data_work_SleepTypeS3_novacustom_nv4x_adl_v1_6_0_rom_set_SleepType_value_Suspend_to_RAM_S3_ b/test/approvals/_dcuc_variable_data_work_SleepTypeS3_novacustom_nv4x_adl_v1_6_0_rom_set_SleepType_value_Suspend_to_RAM_S3_ new file mode 100644 index 0000000..74214e6 --- /dev/null +++ b/test/approvals/_dcuc_variable_data_work_SleepTypeS3_novacustom_nv4x_adl_v1_6_0_rom_set_SleepType_value_Suspend_to_RAM_S3_ @@ -0,0 +1 @@ +Successfully set variable SleepType in the variable store. diff --git a/test/approvals/_dcuc_variable_data_work_UsbMassStorageDisabled_novacustom_nv4x_adl_v1_6_0_rom_get_UsbMassStorage b/test/approvals/_dcuc_variable_data_work_UsbMassStorageDisabled_novacustom_nv4x_adl_v1_6_0_rom_get_UsbMassStorage new file mode 100644 index 0000000..44f03f1 --- /dev/null +++ b/test/approvals/_dcuc_variable_data_work_UsbMassStorageDisabled_novacustom_nv4x_adl_v1_6_0_rom_get_UsbMassStorage @@ -0,0 +1 @@ +Disabled diff --git a/test/approvals/_dcuc_variable_data_work_UsbMassStorageDisabled_novacustom_nv4x_adl_v1_6_0_rom_set_UsbMassStorage_value_Disabled b/test/approvals/_dcuc_variable_data_work_UsbMassStorageDisabled_novacustom_nv4x_adl_v1_6_0_rom_set_UsbMassStorage_value_Disabled new file mode 100644 index 0000000..f62bc69 --- /dev/null +++ b/test/approvals/_dcuc_variable_data_work_UsbMassStorageDisabled_novacustom_nv4x_adl_v1_6_0_rom_set_UsbMassStorage_value_Disabled @@ -0,0 +1 @@ +Successfully set variable UsbMassStorage in the variable store. diff --git a/test/approvals/_dcuc_variable_data_work_UsbMassStorageEnabled_novacustom_nv4x_adl_v1_6_0_rom_get_UsbMassStorage b/test/approvals/_dcuc_variable_data_work_UsbMassStorageEnabled_novacustom_nv4x_adl_v1_6_0_rom_get_UsbMassStorage new file mode 100644 index 0000000..caadf98 --- /dev/null +++ b/test/approvals/_dcuc_variable_data_work_UsbMassStorageEnabled_novacustom_nv4x_adl_v1_6_0_rom_get_UsbMassStorage @@ -0,0 +1 @@ +Enabled diff --git a/test/approvals/_dcuc_variable_data_work_UsbMassStorageEnabled_novacustom_nv4x_adl_v1_6_0_rom_set_UsbMassStorage_value_Enabled b/test/approvals/_dcuc_variable_data_work_UsbMassStorageEnabled_novacustom_nv4x_adl_v1_6_0_rom_set_UsbMassStorage_value_Enabled new file mode 100644 index 0000000..f62bc69 --- /dev/null +++ b/test/approvals/_dcuc_variable_data_work_UsbMassStorageEnabled_novacustom_nv4x_adl_v1_6_0_rom_set_UsbMassStorage_value_Enabled @@ -0,0 +1 @@ +Successfully set variable UsbMassStorage in the variable store. diff --git a/test/approvals/_dcuc_variable_data_work_UsbMassStorageEnabled_novacustom_nv4x_adl_v1_6_0_rom_set_UsbMassStorage_value_InvalidValue b/test/approvals/_dcuc_variable_data_work_UsbMassStorageEnabled_novacustom_nv4x_adl_v1_6_0_rom_set_UsbMassStorage_value_InvalidValue new file mode 100644 index 0000000..c541bc1 --- /dev/null +++ b/test/approvals/_dcuc_variable_data_work_UsbMassStorageEnabled_novacustom_nv4x_adl_v1_6_0_rom_set_UsbMassStorage_value_InvalidValue @@ -0,0 +1 @@ +Value InvalidValue is out of range (expected one of: Disabled / Enabled) diff --git a/test/approvals/_dcuc_variable_data_work_UsbPortPowerDisabled_novacustom_nv4x_adl_v1_6_0_rom_get_UsbPortPower b/test/approvals/_dcuc_variable_data_work_UsbPortPowerDisabled_novacustom_nv4x_adl_v1_6_0_rom_get_UsbPortPower new file mode 100644 index 0000000..44f03f1 --- /dev/null +++ b/test/approvals/_dcuc_variable_data_work_UsbPortPowerDisabled_novacustom_nv4x_adl_v1_6_0_rom_get_UsbPortPower @@ -0,0 +1 @@ +Disabled diff --git a/test/approvals/_dcuc_variable_data_work_UsbPortPowerDisabled_novacustom_nv4x_adl_v1_6_0_rom_set_UsbPortPower_value_Disabled b/test/approvals/_dcuc_variable_data_work_UsbPortPowerDisabled_novacustom_nv4x_adl_v1_6_0_rom_set_UsbPortPower_value_Disabled new file mode 100644 index 0000000..fd8602f --- /dev/null +++ b/test/approvals/_dcuc_variable_data_work_UsbPortPowerDisabled_novacustom_nv4x_adl_v1_6_0_rom_set_UsbPortPower_value_Disabled @@ -0,0 +1 @@ +Successfully set variable UsbPortPower in the variable store. diff --git a/test/approvals/_dcuc_variable_data_work_UsbPortPowerEnabled_novacustom_nv4x_adl_v1_6_0_rom_get_UsbPortPower b/test/approvals/_dcuc_variable_data_work_UsbPortPowerEnabled_novacustom_nv4x_adl_v1_6_0_rom_get_UsbPortPower new file mode 100644 index 0000000..caadf98 --- /dev/null +++ b/test/approvals/_dcuc_variable_data_work_UsbPortPowerEnabled_novacustom_nv4x_adl_v1_6_0_rom_get_UsbPortPower @@ -0,0 +1 @@ +Enabled diff --git a/test/approvals/_dcuc_variable_data_work_UsbPortPowerEnabled_novacustom_nv4x_adl_v1_6_0_rom_set_UsbPortPower_value_Enabled b/test/approvals/_dcuc_variable_data_work_UsbPortPowerEnabled_novacustom_nv4x_adl_v1_6_0_rom_set_UsbPortPower_value_Enabled new file mode 100644 index 0000000..fd8602f --- /dev/null +++ b/test/approvals/_dcuc_variable_data_work_UsbPortPowerEnabled_novacustom_nv4x_adl_v1_6_0_rom_set_UsbPortPower_value_Enabled @@ -0,0 +1 @@ +Successfully set variable UsbPortPower in the variable store. diff --git a/test/approvals/_dcuc_variable_data_work_UsbPortPowerEnabled_novacustom_nv4x_adl_v1_6_0_rom_set_UsbPortPower_value_InvalidValue b/test/approvals/_dcuc_variable_data_work_UsbPortPowerEnabled_novacustom_nv4x_adl_v1_6_0_rom_set_UsbPortPower_value_InvalidValue new file mode 100644 index 0000000..c541bc1 --- /dev/null +++ b/test/approvals/_dcuc_variable_data_work_UsbPortPowerEnabled_novacustom_nv4x_adl_v1_6_0_rom_set_UsbPortPower_value_InvalidValue @@ -0,0 +1 @@ +Value InvalidValue is out of range (expected one of: Disabled / Enabled) diff --git a/test/approve b/test/approve index 5613aec..f36291f 100755 --- a/test/approve +++ b/test/approve @@ -129,6 +129,187 @@ describe "Set FanCurveMode to InvalidMode" describe "Set unsupported variable" approve "$cli variable ${DATA_WORK_DIR}/novacustom_nv4x_adl_v1.6.0.rom --set SerialRedirectionInvalid --value Enabled" +cp ${DATA_WORK_DIR}/novacustom_nv4x_adl_v1.6.0.rom ${DATA_WORK_DIR}/UsbMassStorageEnabled_novacustom_nv4x_adl_v1.6.0.rom +describe "Set UsbMassStorage to Enabled" + approve "$cli variable ${DATA_WORK_DIR}/UsbMassStorageEnabled_novacustom_nv4x_adl_v1.6.0.rom --set UsbMassStorage --value Enabled" + +describe "Get UsbMassStorage (expecting Enabled)" + approve "$cli variable ${DATA_WORK_DIR}/UsbMassStorageEnabled_novacustom_nv4x_adl_v1.6.0.rom --get UsbMassStorage" + +cp ${DATA_WORK_DIR}/novacustom_nv4x_adl_v1.6.0.rom ${DATA_WORK_DIR}/UsbMassStorageDisabled_novacustom_nv4x_adl_v1.6.0.rom +describe "Set UsbMassStorage to Disabled" + approve "$cli variable ${DATA_WORK_DIR}/UsbMassStorageDisabled_novacustom_nv4x_adl_v1.6.0.rom --set UsbMassStorage --value Disabled" + +describe "Get UsbMassStorage (expecting Disabled)" + approve "$cli variable ${DATA_WORK_DIR}/UsbMassStorageDisabled_novacustom_nv4x_adl_v1.6.0.rom --get UsbMassStorage" + +describe "Set UsbMassStorage to InvalidValue" + approve "$cli variable ${DATA_WORK_DIR}/UsbMassStorageEnabled_novacustom_nv4x_adl_v1.6.0.rom --set UsbMassStorage --value InvalidValue" + +cp ${DATA_WORK_DIR}/novacustom_nv4x_adl_v1.6.0.rom ${DATA_WORK_DIR}/QuietBootEnabled_novacustom_nv4x_adl_v1.6.0.rom +describe "Set QuietBoot to Enabled" + approve "$cli variable ${DATA_WORK_DIR}/QuietBootEnabled_novacustom_nv4x_adl_v1.6.0.rom --set QuietBoot --value Enabled" + +describe "Get QuietBoot (expecting Enabled)" + approve "$cli variable ${DATA_WORK_DIR}/QuietBootEnabled_novacustom_nv4x_adl_v1.6.0.rom --get QuietBoot" + +cp ${DATA_WORK_DIR}/novacustom_nv4x_adl_v1.6.0.rom ${DATA_WORK_DIR}/QuietBootDisabled_novacustom_nv4x_adl_v1.6.0.rom +describe "Set QuietBoot to Disabled" + approve "$cli variable ${DATA_WORK_DIR}/QuietBootDisabled_novacustom_nv4x_adl_v1.6.0.rom --set QuietBoot --value Disabled" + +describe "Get QuietBoot (expecting Disabled)" + approve "$cli variable ${DATA_WORK_DIR}/QuietBootDisabled_novacustom_nv4x_adl_v1.6.0.rom --get QuietBoot" + +describe "Set QuietBoot to InvalidValue" + approve "$cli variable ${DATA_WORK_DIR}/QuietBootEnabled_novacustom_nv4x_adl_v1.6.0.rom --set QuietBoot --value InvalidValue" + +cp ${DATA_WORK_DIR}/novacustom_nv4x_adl_v1.6.0.rom ${DATA_WORK_DIR}/FastBootEnabled_novacustom_nv4x_adl_v1.6.0.rom +describe "Set FastBoot to Enabled" + approve "$cli variable ${DATA_WORK_DIR}/FastBootEnabled_novacustom_nv4x_adl_v1.6.0.rom --set FastBoot --value Enabled" + +describe "Get FastBoot (expecting Enabled)" + approve "$cli variable ${DATA_WORK_DIR}/FastBootEnabled_novacustom_nv4x_adl_v1.6.0.rom --get FastBoot" + +cp ${DATA_WORK_DIR}/novacustom_nv4x_adl_v1.6.0.rom ${DATA_WORK_DIR}/FastBootDisabled_novacustom_nv4x_adl_v1.6.0.rom +describe "Set FastBoot to Disabled" + approve "$cli variable ${DATA_WORK_DIR}/FastBootDisabled_novacustom_nv4x_adl_v1.6.0.rom --set FastBoot --value Disabled" + +describe "Get FastBoot (expecting Disabled)" + approve "$cli variable ${DATA_WORK_DIR}/FastBootDisabled_novacustom_nv4x_adl_v1.6.0.rom --get FastBoot" + +describe "Set FastBoot to InvalidValue" + approve "$cli variable ${DATA_WORK_DIR}/FastBootEnabled_novacustom_nv4x_adl_v1.6.0.rom --set FastBoot --value InvalidValue" + +cp ${DATA_WORK_DIR}/novacustom_nv4x_adl_v1.6.0.rom ${DATA_WORK_DIR}/UsbPortPowerEnabled_novacustom_nv4x_adl_v1.6.0.rom +describe "Set UsbPortPower to Enabled" + approve "$cli variable ${DATA_WORK_DIR}/UsbPortPowerEnabled_novacustom_nv4x_adl_v1.6.0.rom --set UsbPortPower --value Enabled" + +describe "Get UsbPortPower (expecting Enabled)" + approve "$cli variable ${DATA_WORK_DIR}/UsbPortPowerEnabled_novacustom_nv4x_adl_v1.6.0.rom --get UsbPortPower" + +cp ${DATA_WORK_DIR}/novacustom_nv4x_adl_v1.6.0.rom ${DATA_WORK_DIR}/UsbPortPowerDisabled_novacustom_nv4x_adl_v1.6.0.rom +describe "Set UsbPortPower to Disabled" + approve "$cli variable ${DATA_WORK_DIR}/UsbPortPowerDisabled_novacustom_nv4x_adl_v1.6.0.rom --set UsbPortPower --value Disabled" + +describe "Get UsbPortPower (expecting Disabled)" + approve "$cli variable ${DATA_WORK_DIR}/UsbPortPowerDisabled_novacustom_nv4x_adl_v1.6.0.rom --get UsbPortPower" + +describe "Set UsbPortPower to InvalidValue" + approve "$cli variable ${DATA_WORK_DIR}/UsbPortPowerEnabled_novacustom_nv4x_adl_v1.6.0.rom --set UsbPortPower --value InvalidValue" + +cp ${DATA_WORK_DIR}/novacustom_nv4x_adl_v1.6.0.rom ${DATA_WORK_DIR}/DescriptorWriteableEnabled_novacustom_nv4x_adl_v1.6.0.rom +describe "Set DescriptorWriteable to Enabled" + approve "$cli variable ${DATA_WORK_DIR}/DescriptorWriteableEnabled_novacustom_nv4x_adl_v1.6.0.rom --set DescriptorWriteable --value Enabled" + +describe "Get DescriptorWriteable (expecting Enabled)" + approve "$cli variable ${DATA_WORK_DIR}/DescriptorWriteableEnabled_novacustom_nv4x_adl_v1.6.0.rom --get DescriptorWriteable" + +cp ${DATA_WORK_DIR}/novacustom_nv4x_adl_v1.6.0.rom ${DATA_WORK_DIR}/DescriptorWriteableDisabled_novacustom_nv4x_adl_v1.6.0.rom +describe "Set DescriptorWriteable to Disabled" + approve "$cli variable ${DATA_WORK_DIR}/DescriptorWriteableDisabled_novacustom_nv4x_adl_v1.6.0.rom --set DescriptorWriteable --value Disabled" + +describe "Get DescriptorWriteable (expecting Disabled)" + approve "$cli variable ${DATA_WORK_DIR}/DescriptorWriteableDisabled_novacustom_nv4x_adl_v1.6.0.rom --get DescriptorWriteable" + +describe "Set DescriptorWriteable to InvalidValue" + approve "$cli variable ${DATA_WORK_DIR}/DescriptorWriteableEnabled_novacustom_nv4x_adl_v1.6.0.rom --set DescriptorWriteable --value InvalidValue" + +cp ${DATA_WORK_DIR}/novacustom_nv4x_adl_v1.6.0.rom ${DATA_WORK_DIR}/DGPUStateiGPUOnly_novacustom_nv4x_adl_v1.6.0.rom +describe "Set DGPUState to iGPU Only" +approve "$cli variable ${DATA_WORK_DIR}/DGPUStateiGPUOnly_novacustom_nv4x_adl_v1.6.0.rom --set DGPUState --value \"iGPU Only\"" + +describe "Get DGPUState (expecting iGPU Only)" + approve "$cli variable ${DATA_WORK_DIR}/DGPUStateiGPUOnly_novacustom_nv4x_adl_v1.6.0.rom --get DGPUState" + +cp ${DATA_WORK_DIR}/novacustom_nv4x_adl_v1.6.0.rom ${DATA_WORK_DIR}/DGPUStateNVIDIAOptimus_novacustom_nv4x_adl_v1.6.0.rom +describe "Set DGPUState to NVIDIA Optimus" +approve "$cli variable ${DATA_WORK_DIR}/DGPUStateNVIDIAOptimus_novacustom_nv4x_adl_v1.6.0.rom --set DGPUState --value \"NVIDIA Optimus\"" + +describe "Get DGPUState (expecting NVIDIA Optimus)" + approve "$cli variable ${DATA_WORK_DIR}/DGPUStateNVIDIAOptimus_novacustom_nv4x_adl_v1.6.0.rom --get DGPUState" + +cp ${DATA_WORK_DIR}/novacustom_nv4x_adl_v1.6.0.rom ${DATA_WORK_DIR}/DGPUStatedGPUOnly_novacustom_nv4x_adl_v1.6.0.rom +describe "Set DGPUState to dGPU Only" +approve "$cli variable ${DATA_WORK_DIR}/DGPUStatedGPUOnly_novacustom_nv4x_adl_v1.6.0.rom --set DGPUState --value \"dGPU Only\"" + +describe "Get DGPUState (expecting dGPU Only)" + approve "$cli variable ${DATA_WORK_DIR}/DGPUStatedGPUOnly_novacustom_nv4x_adl_v1.6.0.rom --get DGPUState" + +describe "Set DGPUState to InvalidValue" + approve "$cli variable ${DATA_WORK_DIR}/DGPUStateiGPUOnly_novacustom_nv4x_adl_v1.6.0.rom --set DGPUState --value InvalidValue" + +cp ${DATA_WORK_DIR}/novacustom_nv4x_adl_v1.6.0.rom ${DATA_WORK_DIR}/SecureBootEnableEnabled_novacustom_nv4x_adl_v1.6.0.rom +describe "Set SecureBootEnable to Enabled" + approve "$cli variable ${DATA_WORK_DIR}/SecureBootEnableEnabled_novacustom_nv4x_adl_v1.6.0.rom --set SecureBootEnable --value Enabled" + +describe "Get SecureBootEnable (expecting Enabled)" + approve "$cli variable ${DATA_WORK_DIR}/SecureBootEnableEnabled_novacustom_nv4x_adl_v1.6.0.rom --get SecureBootEnable" + +cp ${DATA_WORK_DIR}/novacustom_nv4x_adl_v1.6.0.rom ${DATA_WORK_DIR}/SecureBootEnableDisabled_novacustom_nv4x_adl_v1.6.0.rom +describe "Set SecureBootEnable to Disabled" + approve "$cli variable ${DATA_WORK_DIR}/SecureBootEnableDisabled_novacustom_nv4x_adl_v1.6.0.rom --set SecureBootEnable --value Disabled" + +describe "Get SecureBootEnable (expecting Disabled)" + approve "$cli variable ${DATA_WORK_DIR}/SecureBootEnableDisabled_novacustom_nv4x_adl_v1.6.0.rom --get SecureBootEnable" + +describe "Set SecureBootEnable to InvalidValue" + approve "$cli variable ${DATA_WORK_DIR}/SecureBootEnableEnabled_novacustom_nv4x_adl_v1.6.0.rom --set SecureBootEnable --value InvalidValue" + +cp ${DATA_WORK_DIR}/novacustom_nv4x_adl_v1.6.0.rom ${DATA_WORK_DIR}/PowerFailureStatePoweredOff_novacustom_nv4x_adl_v1.6.0.rom +describe "Set PowerFailureState to Powered Off" +approve "$cli variable ${DATA_WORK_DIR}/PowerFailureStatePoweredOff_novacustom_nv4x_adl_v1.6.0.rom --set PowerFailureState --value \"Powered Off\"" + +describe "Get PowerFailureState (expecting Powered Off)" + approve "$cli variable ${DATA_WORK_DIR}/PowerFailureStatePoweredOff_novacustom_nv4x_adl_v1.6.0.rom --get PowerFailureState" + +cp ${DATA_WORK_DIR}/novacustom_nv4x_adl_v1.6.0.rom ${DATA_WORK_DIR}/PowerFailureStatePoweredOn_novacustom_nv4x_adl_v1.6.0.rom +describe "Set PowerFailureState to Powered On" +approve "$cli variable ${DATA_WORK_DIR}/PowerFailureStatePoweredOn_novacustom_nv4x_adl_v1.6.0.rom --set PowerFailureState --value \"Powered On\"" + +describe "Get PowerFailureState (expecting Powered On)" + approve "$cli variable ${DATA_WORK_DIR}/PowerFailureStatePoweredOn_novacustom_nv4x_adl_v1.6.0.rom --get PowerFailureState" + +cp ${DATA_WORK_DIR}/novacustom_nv4x_adl_v1.6.0.rom ${DATA_WORK_DIR}/PowerFailureStateKeep_novacustom_nv4x_adl_v1.6.0.rom +describe "Set PowerFailureState to The state at the moment of power failure" +approve "$cli variable ${DATA_WORK_DIR}/PowerFailureStateKeep_novacustom_nv4x_adl_v1.6.0.rom --set PowerFailureState --value \"The state at the moment of power failure\"" + +describe "Get PowerFailureState (expecting The state at the moment of power failure)" + approve "$cli variable ${DATA_WORK_DIR}/PowerFailureStateKeep_novacustom_nv4x_adl_v1.6.0.rom --get PowerFailureState" + +describe "Set PowerFailureState to InvalidMode" + approve "$cli variable ${DATA_WORK_DIR}/PowerFailureStateKeep_novacustom_nv4x_adl_v1.6.0.rom --set PowerFailureState --value InvalidMode" + +cp ${DATA_WORK_DIR}/novacustom_nv4x_adl_v1.6.0.rom ${DATA_WORK_DIR}/SleepTypeS0ix_novacustom_nv4x_adl_v1.6.0.rom +describe "Set SleepType to Suspend to Idle (S0ix)" +approve "$cli variable ${DATA_WORK_DIR}/SleepTypeS0ix_novacustom_nv4x_adl_v1.6.0.rom --set SleepType --value \"Suspend to Idle (S0ix)\"" + +describe "Get SleepType (expecting Suspend to Idle (S0ix))" + approve "$cli variable ${DATA_WORK_DIR}/SleepTypeS0ix_novacustom_nv4x_adl_v1.6.0.rom --get SleepType" + +cp ${DATA_WORK_DIR}/novacustom_nv4x_adl_v1.6.0.rom ${DATA_WORK_DIR}/SleepTypeS3_novacustom_nv4x_adl_v1.6.0.rom +describe "Set SleepType to Suspend to RAM (S3)" +approve "$cli variable ${DATA_WORK_DIR}/SleepTypeS3_novacustom_nv4x_adl_v1.6.0.rom --set SleepType --value \"Suspend to RAM (S3)\"" + +describe "Get SleepType (expecting Suspend to RAM (S3))" + approve "$cli variable ${DATA_WORK_DIR}/SleepTypeS3_novacustom_nv4x_adl_v1.6.0.rom --get SleepType" + +describe "Set SleepType to InvalidMode" + approve "$cli variable ${DATA_WORK_DIR}/SleepTypeS3_novacustom_nv4x_adl_v1.6.0.rom --set SleepType --value InvalidMode" + +cp ${DATA_WORK_DIR}/novacustom_nv4x_adl_v1.6.0.rom ${DATA_WORK_DIR}/CpuThrottlingOffset10_novacustom_nv4x_adl_v1.6.0.rom +describe "Set CpuThrottlingOffset to 10" + approve "$cli variable ${DATA_WORK_DIR}/CpuThrottlingOffset10_novacustom_nv4x_adl_v1.6.0.rom --set CpuThrottlingOffset --value 10" + +describe "Get CpuThrottlingOffset (expecting 10)" + approve "$cli variable ${DATA_WORK_DIR}/CpuThrottlingOffset10_novacustom_nv4x_adl_v1.6.0.rom --get CpuThrottlingOffset" + +cp ${DATA_WORK_DIR}/novacustom_nv4x_adl_v1.6.0.rom ${DATA_WORK_DIR}/BatteryConfig4200_novacustom_nv4x_adl_v1.6.0.rom +describe "Set BatteryConfig to 4200" + approve "$cli variable ${DATA_WORK_DIR}/BatteryConfig4200_novacustom_nv4x_adl_v1.6.0.rom --set BatteryConfig --value 4200" + +describe "Get BatteryConfig (expecting 4200)" + approve "$cli variable ${DATA_WORK_DIR}/BatteryConfig4200_novacustom_nv4x_adl_v1.6.0.rom --get BatteryConfig" + describe "Set valid MAC" allow_diff $ESCAPED_PWD approve "$cli mac ${DATA_WORK_DIR}/novacustom_v540tu_mtl_v0.9.0_gbe.rom --set 12:34:56:78:9A:BC" diff --git a/test/test-data.sh b/test/test-data.sh index 1481732..55fc871 100644 --- a/test/test-data.sh +++ b/test/test-data.sh @@ -38,10 +38,19 @@ download_test_data() { # - mac dl_test_file novacustom_v540tu_mtl_v0.9.0.rom http://dl.3mdeb.com/open-source-firmware/Dasharo/novacustom_v54x_mtl/v0.9.0/novacustom_v54x_mtl_v0.9.0.rom dl_test_file gbe.bin https://raw.githubusercontent.com/Dasharo/dasharo-blobs/main/novacustom/v5x0tu/gbe.bin - ifdtool -i gbe:${DATA_DL_DIR}/gbe.bin ${DATA_DL_DIR}/novacustom_v540tu_mtl_v0.9.0.rom -O ${DATA_DL_DIR}/novacustom_v540tu_mtl_v0.9.0_gbe.rom &> /dev/null + + # Only run ifdtool if the output file doesn't exist and ifdtool is available + if [ ! -f "${DATA_DL_DIR}/novacustom_v540tu_mtl_v0.9.0_gbe.rom" ]; then + if command -v ifdtool &> /dev/null; then + ifdtool -i gbe:${DATA_DL_DIR}/gbe.bin ${DATA_DL_DIR}/novacustom_v540tu_mtl_v0.9.0.rom -O ${DATA_DL_DIR}/novacustom_v540tu_mtl_v0.9.0_gbe.rom &> /dev/null + else + echo "Warning: ifdtool not found, skipping novacustom_v540tu_mtl_v0.9.0_gbe.rom generation" >&2 + echo "The file may have been generated in a previous run or needs to be created manually" >&2 + fi + fi } refresh_test_data() { mkdir -p "${DATA_WORK_DIR}" - cp ${DATA_DL_DIR}/* ${DATA_WORK_DIR} + cp -f ${DATA_DL_DIR}/* ${DATA_WORK_DIR} 2>/dev/null || true }