mirror of
https://github.com/ddworken/hishtory.git
synced 2025-02-02 19:49:33 +01:00
Revert all the windows+freebsd commits since they seem to be hopelessly broken
This commit is contained in:
parent
02b093c56d
commit
e46221f893
14
.cirrus.yml
14
.cirrus.yml
@ -1,14 +0,0 @@
|
|||||||
freebsd_instance:
|
|
||||||
image: freebsd-12-2-release-amd64
|
|
||||||
task:
|
|
||||||
name: freebsd-test
|
|
||||||
env:
|
|
||||||
TZ: 'America/Los_Angeles' # Force the time zone so that test output is consistent
|
|
||||||
GITHUB_ACTION: 'true'
|
|
||||||
setup_script:
|
|
||||||
- id
|
|
||||||
- pkg install -y bash zsh fish curl go tmux
|
|
||||||
- sudo hostname ghaction-runner-hostname # Set a consistent hostname so we can run tests that depend on it
|
|
||||||
test_script:
|
|
||||||
- id
|
|
||||||
- make test
|
|
5
.github/workflows/go-test.yml
vendored
5
.github/workflows/go-test.yml
vendored
@ -13,7 +13,7 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-latest, macos-latest, windows-latest]
|
os: [ubuntu-latest, macos-latest]
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
@ -23,14 +23,13 @@ jobs:
|
|||||||
go-version: 1.18
|
go-version: 1.18
|
||||||
# - uses: mxschmitt/action-tmate@v3
|
# - uses: mxschmitt/action-tmate@v3
|
||||||
- name: Go test
|
- name: Go test
|
||||||
shell: bash
|
|
||||||
if: ${{ !startsWith(github.event.head_commit.message, 'Release') }}
|
if: ${{ !startsWith(github.event.head_commit.message, 'Release') }}
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update || true
|
sudo apt-get update || true
|
||||||
sudo apt-get install -y zsh fish || true
|
sudo apt-get install -y zsh fish || true
|
||||||
brew install fish tmux bash || true
|
brew install fish tmux bash || true
|
||||||
export TZ='America/Los_Angeles' # Force the time zone so that test output is consistent
|
export TZ='America/Los_Angeles' # Force the time zone so that test output is consistent
|
||||||
sudo chmod 0755 -R /usr/share/zsh/ || true # Work around a weird bug where zsh on ubuntu actions gives that diretory 0777 which makes zsh refuse to start
|
sudo chmod 0755 -R /usr/share/zsh/ || true # Work around a weird bug where zsh on ubuntu actiosn gives that diretory 0777 which makes zsh refuse to start
|
||||||
sudo hostname ghaction-runner-hostname || true # Set a consistent hostname so we can run tests that depend on it
|
sudo hostname ghaction-runner-hostname || true # Set a consistent hostname so we can run tests that depend on it
|
||||||
sudo scutil --set HostName ghaction-runner-hostname || true
|
sudo scutil --set HostName ghaction-runner-hostname || true
|
||||||
make test
|
make test
|
||||||
|
2
Makefile
2
Makefile
@ -3,7 +3,7 @@ forcetest:
|
|||||||
HISHTORY_TEST=1 go test -p 1 -timeout 30m ./...
|
HISHTORY_TEST=1 go test -p 1 -timeout 30m ./...
|
||||||
|
|
||||||
test:
|
test:
|
||||||
HISHTORY_TEST=1 go test -p 1 -timeout 45m ./...
|
HISHTORY_TEST=1 go test -p 1 -timeout 30m ./...
|
||||||
|
|
||||||
acttest:
|
acttest:
|
||||||
act push -j test -e .github/push_event.json --reuse --container-architecture linux/amd64
|
act push -j test -e .github/push_event.json --reuse --container-architecture linux/amd64
|
||||||
|
@ -388,7 +388,7 @@ echo thisisrecorded`)
|
|||||||
// Test the actual table output
|
// Test the actual table output
|
||||||
hostnameMatcher := `\S+`
|
hostnameMatcher := `\S+`
|
||||||
tableDividerMatcher := `\s+`
|
tableDividerMatcher := `\s+`
|
||||||
pathMatcher := `~?/?[a-zA-Z_0-9/-]+`
|
pathMatcher := `~?/[a-zA-Z_0-9/-]+`
|
||||||
datetimeMatcher := `[a-zA-Z]{3}\s\d{1,2}\s\d{4}\s[0-9:]+\s([A-Z]{3}|[+-]\d{4})`
|
datetimeMatcher := `[a-zA-Z]{3}\s\d{1,2}\s\d{4}\s[0-9:]+\s([A-Z]{3}|[+-]\d{4})`
|
||||||
runtimeMatcher := `[0-9.ms]+`
|
runtimeMatcher := `[0-9.ms]+`
|
||||||
exitCodeMatcher := `0`
|
exitCodeMatcher := `0`
|
||||||
@ -845,7 +845,7 @@ echo hello2
|
|||||||
}
|
}
|
||||||
|
|
||||||
func getPidofCommand() string {
|
func getPidofCommand() string {
|
||||||
if runtime.GOOS == "darwin" || runtime.GOOS == "freebsd" {
|
if runtime.GOOS == "darwin" {
|
||||||
// MacOS doesn't have pidof by default
|
// MacOS doesn't have pidof by default
|
||||||
return "pgrep"
|
return "pgrep"
|
||||||
}
|
}
|
||||||
@ -919,9 +919,6 @@ func testTimestampsAreReasonablyCorrect(t *testing.T, tester shellTester) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func testTableDisplayCwd(t *testing.T, tester shellTester) {
|
func testTableDisplayCwd(t *testing.T, tester shellTester) {
|
||||||
if runtime.GOOS == "freebsd" {
|
|
||||||
t.Skip()
|
|
||||||
}
|
|
||||||
// Setup
|
// Setup
|
||||||
defer testutils.BackupAndRestore(t)()
|
defer testutils.BackupAndRestore(t)()
|
||||||
installHishtory(t, tester, "")
|
installHishtory(t, tester, "")
|
||||||
@ -1027,9 +1024,6 @@ echo foo`)
|
|||||||
}
|
}
|
||||||
|
|
||||||
func testDisplayTable(t *testing.T, tester shellTester) {
|
func testDisplayTable(t *testing.T, tester shellTester) {
|
||||||
if runtime.GOOS == "freebsd" {
|
|
||||||
t.Skip()
|
|
||||||
}
|
|
||||||
// Setup
|
// Setup
|
||||||
defer testutils.BackupAndRestore(t)()
|
defer testutils.BackupAndRestore(t)()
|
||||||
userSecret := installHishtory(t, tester, "")
|
userSecret := installHishtory(t, tester, "")
|
||||||
@ -1744,9 +1738,6 @@ func testHandleUpgradedFeatures(t *testing.T, tester shellTester) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestFish(t *testing.T) {
|
func TestFish(t *testing.T) {
|
||||||
if runtime.GOOS == "freebsd" {
|
|
||||||
t.Skip()
|
|
||||||
}
|
|
||||||
// Setup
|
// Setup
|
||||||
defer testutils.BackupAndRestore(t)()
|
defer testutils.BackupAndRestore(t)()
|
||||||
tester := bashTester{}
|
tester := bashTester{}
|
||||||
@ -2013,9 +2004,6 @@ func testControlR(t *testing.T, tester shellTester, shellName string, onlineStat
|
|||||||
}
|
}
|
||||||
|
|
||||||
func testCustomColumns(t *testing.T, tester shellTester) {
|
func testCustomColumns(t *testing.T, tester shellTester) {
|
||||||
if runtime.GOOS == "freebsd" {
|
|
||||||
t.Skip()
|
|
||||||
}
|
|
||||||
// Setup
|
// Setup
|
||||||
defer testutils.BackupAndRestore(t)()
|
defer testutils.BackupAndRestore(t)()
|
||||||
installHishtory(t, tester, "")
|
installHishtory(t, tester, "")
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
bash-5.2$ source /Users/runner/.bashrc
|
bash-5.2$ source /Users/runner/.bashrc
|
||||||
hishtory tquery -pipefail
|
|
||||||
bash-5.2$ hishtory tquery -pipefail
|
bash-5.2$ hishtory tquery -pipefail
|
||||||
|
|
||||||
|
|
||||||
|
@ -165,7 +165,7 @@ func buildServer() {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
panic(fmt.Sprintf("failed to getwd: %v", err))
|
panic(fmt.Sprintf("failed to getwd: %v", err))
|
||||||
}
|
}
|
||||||
if strings.HasSuffix(wd, "/hishtory") || strings.HasSuffix(wd, "/cirrus-ci-build") {
|
if strings.HasSuffix(wd, "/hishtory") {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
err = os.Chdir("../")
|
err = os.Chdir("../")
|
||||||
|
Loading…
Reference in New Issue
Block a user