Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates for modeling lighting systems #1021

Draft
wants to merge 51 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
cbbe64b
Sketch of a lighting system
grafnu Oct 4, 2024
8e61bc5
Merge branch 'master' into lighting
grafnu Oct 4, 2024
96e6d5c
Merge branch 'master' into lighting
grafnu Oct 5, 2024
bcd13b4
Adding lighting groups
grafnu Oct 5, 2024
7b11b73
Adding some other lighting stuff
grafnu Oct 5, 2024
0d6a283
Fixing registration summary
grafnu Oct 5, 2024
d3a4aa4
Fixing registratioN-summary
grafnu Oct 5, 2024
7be6ea2
Merge branch 'master' into lighting
grafnu Oct 7, 2024
7265134
Adding parent
grafnu Oct 7, 2024
acf8095
Merge branch 'master' into lighting
grafnu Oct 9, 2024
9e857e3
Merge branch 'master' into lighting
grafnu Oct 9, 2024
09f10d9
Merge branch 'master' into lighting
grafnu Oct 9, 2024
e2aad3c
Merge branch 'master' into lighting
grafnu Oct 10, 2024
c6b21a8
Merge branch 'master' into lighting
grafnu Oct 11, 2024
c97cc5b
Merge branch 'master' into lighting
grafnu Oct 11, 2024
78dbdf8
Merge branch 'master' into lighting
grafnu Oct 14, 2024
1a0acab
Merge branch 'master' into lighting
grafnu Oct 15, 2024
0c6a2a8
Fix sequencer tracker
grafnu Oct 15, 2024
114bdf2
Merge remote-tracking branch 'faucet/master'
grafnu Oct 15, 2024
021f2b1
Merge branch 'master' into lighting
grafnu Oct 15, 2024
3ed7d04
Merge branch 'master' into lighting
grafnu Oct 21, 2024
4610ba8
Merge branch 'master' into lighting
grafnu Oct 22, 2024
415ef5e
Merge branch 'master' into lighting
grafnu Oct 23, 2024
20a75bd
Merge branch 'master' into lighting
grafnu Oct 23, 2024
13e9cb1
Merge branch 'master' into lighting
grafnu Oct 25, 2024
f2594ca
Merge branch 'master' into lighting
grafnu Oct 26, 2024
53bbe08
Merge branch 'master' into lighting
grafnu Oct 26, 2024
f49bcde
Merge branch 'master' into lighting
grafnu Oct 28, 2024
4894de2
Merge branch 'master' into lighting
grafnu Oct 30, 2024
d61c367
Merge branch 'master' into lighting
grafnu Oct 31, 2024
5304bfe
Merge branch 'master' into lighting
grafnu Nov 1, 2024
95ae455
Merge branch 'master' into lighting
grafnu Nov 1, 2024
6461a11
Merge branch 'master' into lighting
grafnu Nov 1, 2024
62c8423
Merge branch 'master' into lighting
grafnu Nov 1, 2024
0d7c3cc
Merge branch 'master' into lighting
grafnu Nov 2, 2024
c1f9dc6
Merge branch 'master' into lighting
grafnu Nov 4, 2024
3801e34
Merge branch 'master' into lighting
grafnu Nov 5, 2024
2d37fa1
Merge branch 'master' into lighting
grafnu Nov 6, 2024
bf42c26
Merge branch 'master' into lighting
grafnu Nov 6, 2024
663b55a
Merge branch 'master' into lighting
grafnu Nov 11, 2024
84adaaa
Merge branch 'master' into lighting
grafnu Nov 12, 2024
2e53b37
Merge branch 'master' into lighting
grafnu Nov 14, 2024
3e0fa8e
Merge branch 'master' into lighting
grafnu Nov 15, 2024
b299e85
Merge branch 'master' into lighting
grafnu Nov 15, 2024
eb1859c
Merge branch 'master' into lighting
grafnu Nov 16, 2024
3a65c6b
Merge branch 'master' into lighting
grafnu Nov 16, 2024
43be2ff
Merge branch 'master' into lighting
grafnu Nov 21, 2024
e295d0f
Merge branch 'master' into lighting
grafnu Nov 22, 2024
e7c79b1
Merge branch 'master' into lighting
grafnu Nov 23, 2024
5703535
Merge branch 'master' into lighting
grafnu Nov 26, 2024
f8e254f
Merge branch 'master' into lighting
grafnu Nov 27, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .gencode_hash.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ c3bae844432d172033bc416e623fecee7608efd01d916b7eaee96252932c552a gencode/docs/e
d001ca2ede044a183ef25617e6d7bd87840695d0b2aeb03a0d3d7b8d7bbebe42 gencode/docs/events_system.html
e59e52110ec12d7b82351abfc28c31255c57e2af637adf3fa5cbb7e3b26b49fe gencode/docs/events_udmi.html
e3683cb4561b6dda5703cb659fd6a8f12242725de389709a12eb45f146cbb295 gencode/docs/events_validation.html
93ee95500d565209e18d74da17a936621616337ad674932f77c6aef8693973cb gencode/docs/metadata.html
a952fb4d5fcd5446d55133117c3d7c8cf69778415e533f737f306805742b6721 gencode/docs/metadata.html
424f8e053c5a7002c4117a70bd84731e3bb6e0f696b607aba412c2aee44d9f91 gencode/docs/monitoring.html
3421bdc8c63872fb47795993a2d21da0d03a7ec4e6de0ac7cfe7a48ef60e743b gencode/docs/persistent_device.html
5d039d607af9ec75ee552dfe36b16c702687ea16f5663f41fc49b4533b86e00d gencode/docs/properties.html
Expand Down Expand Up @@ -78,13 +78,13 @@ b39e12241d1bdabe0db583dc01a7a6b87efb5b57957dae5a3571cfec077b397c gencode/java/u
7206888cd092db347e7e92168987798eb0a3f290f2ed307427d971f15b18c49a gencode/java/udmi/schema/FeatureValidationState.java
e256275d840d94c6e61316e756b0dad6d823db8900e35e785f6ef5001fdb5fc9 gencode/java/udmi/schema/Gas.java
a773f8271a99f96a3fb09ceb79bc4022a8b7ab941f5e6246e073703d33022b99 gencode/java/udmi/schema/GatewayConfig.java
0f176bbd9748ac357ebcb7cf9ba66fca4f4768ce40a2a1436bb6d14093ee8101 gencode/java/udmi/schema/GatewayModel.java
bd329ce24df6e78317e15176956701e235a3639b1303af696c6537881f49be59 gencode/java/udmi/schema/GatewayModel.java
1f7f6809e143e9e3e13e6fa73776a893b62b0c05f8802087b1e276dc0ab83e19 gencode/java/udmi/schema/GatewayState.java
175bdf9cc0b376b7f6c6b21174cb0ec568c49a1026e99bbdbc264b3cea7e7702 gencode/java/udmi/schema/IotAccess.java
d0858bd7ba306176f4e3c19eeb69ef2467afec0832b6917b72d3ab87469e4974 gencode/java/udmi/schema/Jwt.java
5a0cc53317592a868f7f23a67a7493bd571054bb25d9e28de51000ad6473dfeb gencode/java/udmi/schema/Level.java
6b4c29a682d0697d5420efb9e7788ec7358d94435da288938007205b8669e180 gencode/java/udmi/schema/LocalnetConfig.java
563bd616d4eb4201237ad356a144de80a4d0d1713701049009d0dbdab9fc37be gencode/java/udmi/schema/LocalnetModel.java
1b7e831fff7ff71a2bef3a6d4076002b10b880ce43d1c7dfa582fa914b518e65 gencode/java/udmi/schema/LocalnetModel.java
b250808d1818cbe5366473cf814e9949c8c17dc4b5b2b281ba5845f3a696ba97 gencode/java/udmi/schema/LocalnetState.java
9fd5185768bae32e69020e85e6af424f0e42af7dd4a2d69302395880f699d046 gencode/java/udmi/schema/Location.java
ca575e906937fbd2137e552a5943a976a81eccfbcd5db607ebb4e70254c604db gencode/java/udmi/schema/MappingCommand.java
Expand Down Expand Up @@ -198,8 +198,8 @@ dc4bef0026ac8d9b0e5b13fe675b16df889e38671a7946371fe47d0443d82e4d gencode/python
387e3f68dad9ddd6211a4e10d25c35026a4c0083b606819fdb4e338be9e135ca gencode/python/udmi/schema/model_discovery.py
cead43bbefcc2d957bf8316560edf849d74df9270f9473d87c2a3bdf61f08332 gencode/python/udmi/schema/model_discovery_family.py
bef91798566798ec70b2fe10ae52c909090de9095b92e2567da3cbdcec29cd2c gencode/python/udmi/schema/model_features.py
72d17ba53c9d537720bb0ddf24d615b838fc2b9bb2a5c288742a8d82c77bd85d gencode/python/udmi/schema/model_gateway.py
3e2f7eea6bc5f56b416d883f1da7336f479ab2f88ae47d174d22b7941ac9cfc3 gencode/python/udmi/schema/model_localnet.py
b7393a8d2578f0180908becd68bc3131023251f98d789d65f436ece75f31bdb6 gencode/python/udmi/schema/model_gateway.py
ae6a7bc93b520cdc90cd158f876a58e98a3e000402ebb1ca632f01ee492d408a gencode/python/udmi/schema/model_localnet.py
083afb4579592a702876e579bdc3986d85b803f6e0b3da70729ef928502ccad8 gencode/python/udmi/schema/model_localnet_family.py
cd4be21b66fb3e28dff96cfd39a878791ae8543f2fe67269b66c2c360d3f2513 gencode/python/udmi/schema/model_pointset.py
9e71f057103c1c7a580add2da30ae49f10248852adbab463a9c8239ef0d1407c gencode/python/udmi/schema/model_pointset_point.py
Expand Down
56 changes: 37 additions & 19 deletions bin/test_sites
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ function redact_files {
continue
fi
sed -E -i \
-e 's-"udmi_version" : ".*"$-udmi_version REDACTED-' \
-e 's-oading .*udmi/tests/-REDACTED/-' \
-e 's-^ .*udmi/tests/- REDACTED/-' \
$file
Expand All @@ -41,46 +42,59 @@ function redact_files {

if [[ $# == 0 ]]; then
subsets=$(cd $sitesdir; ls -d *)
do_mock=y
else
subsets=$*
fi

echo Testing against: $subsets

FAILURES=out/test_sites-fixes.sh
FAILURES=out/test_sites-failures
rm -f $FAILURES

for subset in $subsets; do
echo '##########################################' Testing site $subset
site_dir=$sitesdir/$subset
devicesdir=$site_dir/devices
rm -rf $devicesdir/*/out
mkdir -p $devicesdir
devices=$(cd $devicesdir; ls -d *)
devices_dir=$site_dir/devices
rm -rf $devices_dir/*/out
mkdir -p $devices_dir
devices=$(cd $devices_dir; ls -d *)

# Clean up some stuff that might be left over from unit testing.
for device in $devices; do
if [[ ! -f $devicesdir/$device/metadata.json ]]; then
rm -rf $devicesdir/$device
if [[ ! -f $devices_dir/$device/metadata.json ]]; then
rm -rf $devices_dir/$device
fi
done

# Test the direct config-file variant of registrar.
# Test the direct config-file variant of registrar (no project spec)
bin/registrar $site_dir/cloud_iot_config.json

reg_file=$site_dir/registration_summary.json
reg_out=$site_dir/out/registration_summary.json
[[ -f $reg_file ]] || touch $reg_file
redact_files $reg_out
diffs=$(diff -q $reg_out $reg_file 2>&1) || true
if [[ -n $diffs ]]; then
cat <<< $diffs >> $FAILURES
diff $reg_out $reg_file || true
fi

for device in $devices; do
if [[ -d $devicesdir/$device/out ]]; then
redact_files $devicesdir/$device/out/* $site_dir/registration_summary.json
diffs=$(diff -rq $devicesdir/$device/out $devicesdir/$device/expected 2>&1) || true
device_dir=$devices_dir/$device
if [[ -d $device_dir/out ]]; then
redact_files $device_dir/out/*
diffs=$(diff -rq $device_dir/out $device_dir/expected 2>&1) || true
if [[ -n $diffs ]]; then
cat <<< $diffs >> $FAILURES
diff -r $devicesdir/$device/out $devicesdir/$device/expected || true
diff -r $device_dir/out $device_dir/expected || true
fi
elif [[ -d $devicesdir/$device/expected ]]; then
echo Missing output directory $devicesdir/$device/out
elif [[ -d $device_dir/expected ]]; then
echo Missing output directory $device_dir/out
false
fi
done

done

if [[ -s $FAILURES ]]; then
Expand All @@ -90,17 +104,21 @@ if [[ -s $FAILURES ]]; then
-e 's/^Files (.*) and (.*) differ$/cp \1 \2/' \
-e 's-^Only in (.*)/out: (.*)$-touch \1/expected/\2-' \
-e 's-^Only in (.*)/expected: (.*)$-rm \1/expected/\2-' \
-e 's-^diff: (.*)/expected: No such file or directory$-mkdir \1/expected-' \
$FAILURES
cat $FAILURES
chmod +x $FAILURES
false
fi

echo '#########################################' Testing simple mock sequencer...
bin/sequencer tests/sites/downgrade/ -- DWN-2 system_mode_restart || true
if [[ -n $do_mock ]]; then
echo '#########################################' Testing simple mock sequencer...
bin/sequencer tests/sites/downgrade/ -- DWN-2 system_mode_restart || true

RESULTLOG=tests/sites/downgrade/out/devices/DWN-2/RESULT.log
fgrep "RESULT fail system.mode system_mode_restart ALPHA " $RESULTLOG ||
bin/fail unexpected output from $RESULTLOG
RESULTLOG=tests/sites/downgrade/out/devices/DWN-2/RESULT.log
fgrep "RESULT fail system.mode system_mode_restart ALPHA " $RESULTLOG ||
bin/fail unexpected output from $RESULTLOG
fi

echo
echo '#########################################' Done with site tests
Loading
Loading