From 2215aa3bf801224eb5975fc0f53cd9201e3863ec Mon Sep 17 00:00:00 2001 From: Allison Karlitskaya Date: Fri, 26 May 2023 14:41:33 +0200 Subject: [PATCH] Makefile: bump our test/common dependency ... and make use of the new pywrap feature from our test. Use the same eslint and stylelint plugin configuration as the cockpit main repo. Co-authored-by: Katerina Koukiou --- .eslintrc.json | 7 ++----- Makefile | 8 +++----- package.json | 4 +++- test/check-application | 10 ++-------- 4 files changed, 10 insertions(+), 19 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 7818ff7..1918f1a 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -4,12 +4,9 @@ "browser": true, "es6": true }, - "extends": ["eslint:recommended", "standard", "standard-jsx", "react-app"], + "extends": ["eslint:recommended", "standard", "standard-jsx", "standard-react"], "parserOptions": { - "ecmaVersion": "7", - "ecmaFeatures": { - "jsx": true - }, + "ecmaVersion": "2022", "sourceType": "module" }, "plugins": ["flowtype", "react", "react-hooks"], diff --git a/Makefile b/Makefile index 20b8afe..9de0ea7 100644 --- a/Makefile +++ b/Makefile @@ -29,12 +29,10 @@ all: $(DIST_TEST) COCKPIT_REPO_FILES = \ pkg/lib \ test/common \ - tools/git-utils.sh \ - tools/make-bots \ $(NULL) COCKPIT_REPO_URL = https://github.com/cockpit-project/cockpit.git -COCKPIT_REPO_COMMIT = 3ca979d542a4d6cf865f2132e0bdf1b06c49d07f # 292 + 56 commits +COCKPIT_REPO_COMMIT = 63eee8e92dafcbfffe32f7018cbda7c2e7a2642f # 292-75-g63eee8e92 $(COCKPIT_REPO_FILES): $(COCKPIT_REPO_STAMP) COCKPIT_REPO_TREE = '$(strip $(COCKPIT_REPO_COMMIT))^{tree}' @@ -192,8 +190,8 @@ check: prepare-check TEST_AUDIT_NO_SELINUX=1 test/common/run-tests ${RUN_TESTS_OPTIONS} # checkout Cockpit's bots for standard test VM images and API to launch them -bots: tools/make-bots - tools/make-bots +bots: $(COCKPIT_REPO_STAMP) + test/common/make-bots $(NODE_MODULES_TEST): package.json # if it exists already, npm install won't update it; force that so that we always get up-to-date packages diff --git a/package.json b/package.json index 0781678..dd26754 100644 --- a/package.json +++ b/package.json @@ -23,15 +23,16 @@ "esbuild-sass-plugin": "^2.8.0", "esbuild-wasm": "^0.17.16", "eslint": "^8.13.0", - "eslint-config-react-app": "^7.0.0", "eslint-config-standard": "^17.0.0-1", "eslint-config-standard-jsx": "^11.0.0-1", + "eslint-config-standard-react": "^13.0.0", "eslint-plugin-flowtype": "^8.0.3", "eslint-plugin-import": "^2.26.0", "eslint-plugin-node": "^11.1.0", "eslint-plugin-promise": "^6.0.0", "eslint-plugin-react": "^7.29.4", "eslint-plugin-react-hooks": "^4.4.0", + "eslint-plugin-standard": "^5.0.0", "htmlparser": "^1.7.7", "jed": "^1.1.1", "po2json": "^1.0.0-alpha", @@ -39,6 +40,7 @@ "sass": "^1.61.0", "sizzle": "^2.3.3", "stylelint": "^14.9.1", + "stylelint-config-standard": "^25.0.0", "stylelint-config-standard-scss": "^5.0.0", "stylelint-formatter-pretty": "^3.2.0" }, diff --git a/test/check-application b/test/check-application index b5503c5..3d583ea 100755 --- a/test/check-application +++ b/test/check-application @@ -1,15 +1,9 @@ -#!/usr/bin/python3 +#!/usr/bin/python3 -cimport os, sys; os.execv(os.path.dirname(sys.argv[1]) + "/common/pywrap", sys.argv) + # Run this with --help to see available options for tracing and debugging # See https://github.com/cockpit-project/cockpit/blob/main/test/common/testlib.py # "class Browser" and "class MachineCase" for the available API. -import os -import sys - -# import Cockpit's machinery for test VMs and its browser test API -TEST_DIR = os.path.dirname(__file__) -sys.path.append(os.path.join(TEST_DIR, "common")) -sys.path.append(os.path.join(os.path.dirname(TEST_DIR), "bots/machine")) import testlib # Nondestructive tests all run in the same running VM. This allows them to run in Packit, Fedora, and RHEL dist-git gating