Skip to content
This repository was archived by the owner on Dec 20, 2023. It is now read-only.

Commit f423972

Browse files
committed
Add missing Google copyright/Apache license
Several helper scripts were missing the Apache license. This commit addresses the issue.
1 parent 7a1da3f commit f423972

File tree

5 files changed

+97
-9
lines changed

5 files changed

+97
-9
lines changed

src/adaptations/device-layer/GenTestDeviceIds.py

Lines changed: 26 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
#
2+
# Copyright (c) 2018-2019 Google, LLC.
3+
# All rights reserved.
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
#
17+
118
import os
219
import sys
320
import re
@@ -70,23 +87,23 @@ def indent(s, indentStr=' '):
7087

7188
with open(inFileName, 'r') as inFile:
7289
with open(outFileName, 'w') as outFile:
73-
90+
7491
outFile.write(preamble);
75-
92+
7693
for line in inFile:
7794
line = line.strip()
78-
95+
7996
if line == "":
8097
continue
81-
98+
8299
(macAddr, certificate, privateKey) = [ x.strip() for x in line.split(',')[:3]]
83100

84101
if macAddr == 'MAC' and certificate == 'Certificate' and privateKey == 'Private Key':
85102
continue
86103

87104
certificate = base64.b64decode(certificate)
88105
privateKey = base64.b64decode(privateKey)
89-
106+
90107
idNum = int(macAddr[-2:], 16)
91108

92109
outFile.write('''\
@@ -102,9 +119,9 @@ def indent(s, indentStr=' '):
102119
const uint8_t TestDeviceCert[] =
103120
{
104121
''' % (macAddr))
105-
122+
106123
outFile.write(indent(toArrayInit(certificate).strip()))
107-
124+
108125
outFile.write('''
109126
};
110127
@@ -113,12 +130,12 @@ def indent(s, indentStr=' '):
113130
''')
114131

115132
outFile.write(indent(toArrayInit(privateKey).strip()))
116-
133+
117134
outFile.write('''
118135
};
119136
120137
''')
121-
138+
122139
outFile.write('''\
123140
#endif // WEAVE_DEVICE_CONFIG_ENABLE_TEST_DEVICE_IDENTITY == %d
124141
''' % (idNum))
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
11
#!/bin/bash
2+
3+
# Copyright (c) 2019 Google, LLC.
4+
# Copyright (c) 2016-2017 Nest Labs, Inc.
5+
# All rights reserved.
6+
#
7+
# Licensed under the Apache License, Version 2.0 (the "License");
8+
# you may not use this file except in compliance with the License.
9+
# You may obtain a copy of the License at
10+
#
11+
# http://www.apache.org/licenses/LICENSE-2.0
12+
#
13+
# Unless required by applicable law or agreed to in writing, software
14+
# distributed under the License is distributed on an "AS IS" BASIS,
15+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
# See the License for the specific language governing permissions and
17+
# limitations under the License.
18+
#
19+
220
${abs_srcdir}/happy/tests/standalone/time/test_weave_time_01.py --syncmode auto
321
exit $?
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
11
#!/bin/bash
2+
3+
# Copyright (c) 2019 Google, LLC.
4+
# Copyright (c) 2016-2017 Nest Labs, Inc.
5+
# All rights reserved.
6+
#
7+
# Licensed under the Apache License, Version 2.0 (the "License");
8+
# you may not use this file except in compliance with the License.
9+
# You may obtain a copy of the License at
10+
#
11+
# http://www.apache.org/licenses/LICENSE-2.0
12+
#
13+
# Unless required by applicable law or agreed to in writing, software
14+
# distributed under the License is distributed on an "AS IS" BASIS,
15+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
# See the License for the specific language governing permissions and
17+
# limitations under the License.
18+
#
19+
220
${abs_srcdir}/happy/tests/standalone/time/test_weave_time_01.py --syncmode local
321
exit $?
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
11
#!/bin/bash
2+
3+
# Copyright (c) 2019 Google, LLC.
4+
# Copyright (c) 2016-2017 Nest Labs, Inc.
5+
# All rights reserved.
6+
#
7+
# Licensed under the Apache License, Version 2.0 (the "License");
8+
# you may not use this file except in compliance with the License.
9+
# You may obtain a copy of the License at
10+
#
11+
# http://www.apache.org/licenses/LICENSE-2.0
12+
#
13+
# Unless required by applicable law or agreed to in writing, software
14+
# distributed under the License is distributed on an "AS IS" BASIS,
15+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
# See the License for the specific language governing permissions and
17+
# limitations under the License.
18+
#
19+
220
${abs_srcdir}/happy/tests/standalone/time/test_weave_time_01.py --syncmode service
321
exit $?

src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_mutual_subscribe_faults_happy.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,22 @@
11
#!/bin/bash
22

3+
#
4+
# Copyright (c) 2018-2019 Google, LLC.
5+
# All rights reserved.
6+
#
7+
# Licensed under the Apache License, Version 2.0 (the "License");
8+
# you may not use this file except in compliance with the License.
9+
# You may obtain a copy of the License at
10+
#
11+
# http://www.apache.org/licenses/LICENSE-2.0
12+
#
13+
# Unless required by applicable law or agreed to in writing, software
14+
# distributed under the License is distributed on an "AS IS" BASIS,
15+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
# See the License for the specific language governing permissions and
17+
# limitations under the License.
18+
#
19+
320
# The fault injection script for mutual subscription has some extra checks on the happy sequence;
421
# it enforces that the happy sequence indeed covers all the fault points that it is meant to exercise.
522
# This test runs that script without injecting faults, so we can catch if the happy sequence changes,

0 commit comments

Comments
 (0)