New issue
Advanced search Search tips

Issue 897753 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Nov 10
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Refactor common code from cros_config_schema and cros_config_test_schema

Project Member Reported by gmeinke@chromium.org, Oct 22

Issue description

Refactor common code and tests from cros_config_schema and cros_config_test_schema. There are a lot of common functions and tests and a few functions that need a bit of rework.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Oct 26

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform2/+/99ec4d099b358b2fe99d9e35d0c50e4ec12d5f69

commit 99ec4d099b358b2fe99d9e35d0c50e4ec12d5f69
Author: Gregory Meinke <gmeinke@chromium.org>
Date: Fri Oct 26 19:14:55 2018

chromeos-config: Add cros_config_test_schema proc

Add new python processing of YAML commands for cros config tast coverage
testing, output JSON as input during build stage.

BUG= chromium:891857 ,  chromium:897753 
TEST=local unit tests

Change-Id: I6eacd74ea607046437c9aa8be77de193bc0ada19
Reviewed-on: https://chromium-review.googlesource.com/1286078
Commit-Ready: Gregory Meinke <gmeinke@chromium.org>
Tested-by: Gregory Meinke <gmeinke@chromium.org>
Reviewed-by: C Shapiro <shapiroc@chromium.org>

[add] https://crrev.com/99ec4d099b358b2fe99d9e35d0c50e4ec12d5f69/chromeos-config/cros_config_host/cros_config_test_schema.py
[modify] https://crrev.com/99ec4d099b358b2fe99d9e35d0c50e4ec12d5f69/chromeos-config/setup.py
[add] https://crrev.com/99ec4d099b358b2fe99d9e35d0c50e4ec12d5f69/chromeos-config/cros_config_host/cros_config_test_schema.yaml
[add] https://crrev.com/99ec4d099b358b2fe99d9e35d0c50e4ec12d5f69/chromeos-config/cros_config_host/test_data/cros_config_test_device.yaml
[add] https://crrev.com/99ec4d099b358b2fe99d9e35d0c50e4ec12d5f69/chromeos-config/cros_config_host/test_data/cros_config_test_common.yaml
[add] https://crrev.com/99ec4d099b358b2fe99d9e35d0c50e4ec12d5f69/chromeos-config/cros_config_host/libcros_schema_unittest.py
[add] https://crrev.com/99ec4d099b358b2fe99d9e35d0c50e4ec12d5f69/chromeos-config/cros_config_host/cros_config_test_schema_unittest.py
[add] https://crrev.com/99ec4d099b358b2fe99d9e35d0c50e4ec12d5f69/chromeos-config/cros_config_host/libcros_schema.py

Project Member

Comment 2 by bugdroid1@chromium.org, Nov 9

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform2/+/89a6cafe165c2c49e8c7b5f11ca4e747066ae703

commit 89a6cafe165c2c49e8c7b5f11ca4e747066ae703
Author: Gregory Meinke <gmeinke@chromium.org>
Date: Fri Nov 09 22:43:53 2018

chromeos-config: Fix test schema json format

BUG= chromium:891857 ,  chromium:897753 
TEST=local unittests and output format read in tast test

Output json was not pretty printed correctly causing file to be a
string with newline chars instead of actual newlines. This broke
the Golang unmarshal to struct.

Refactored a bunch of cros_config_schema to use the common schema
functions.

Change-Id: I0cf2650050513d8a74693404af24bd55b7aac4f1
Reviewed-on: https://chromium-review.googlesource.com/1312647
Commit-Ready: Gregory Meinke <gmeinke@chromium.org>
Tested-by: Gregory Meinke <gmeinke@chromium.org>
Reviewed-by: C Shapiro <shapiroc@chromium.org>
Reviewed-by: Evan Hernandez <evanhernandez@chromium.org>

[modify] https://crrev.com/89a6cafe165c2c49e8c7b5f11ca4e747066ae703/chromeos-config/cros_config_host/cros_config_schema.py
[modify] https://crrev.com/89a6cafe165c2c49e8c7b5f11ca4e747066ae703/chromeos-config/cros_config_host/cros_config_test_schema.py
[modify] https://crrev.com/89a6cafe165c2c49e8c7b5f11ca4e747066ae703/chromeos-config/cros_config_host/cros_config_schema_unittest.py
[modify] https://crrev.com/89a6cafe165c2c49e8c7b5f11ca4e747066ae703/chromeos-config/cros_config_host/cros_config_test_schema_unittest.py
[modify] https://crrev.com/89a6cafe165c2c49e8c7b5f11ca4e747066ae703/chromeos-config/cros_config_host/libcros_schema.py

Status: Fixed (was: Assigned)

Sign in to add a comment