From 1ff4a30da74de0a396c2dfce00251c6b38b78b6f Mon Sep 17 00:00:00 2001 From: hrj Date: Tue, 13 Apr 2021 13:42:34 +0530 Subject: [PATCH] use tesseract instead of gocr Signed-off-by: hrj --- .github/workflows/ci.yml | 2 +- tests/locustfile-functional.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e3f7aa3..8a5d80d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,4 +21,4 @@ jobs: - name: Run linter run: sbt "scalafixAll --check" - name: Run locust tests - run: sudo apt-get install -y gocr && ./tests/run.sh + run: sudo apt-get install -y tesseract-ocr && ./tests/run.sh diff --git a/tests/locustfile-functional.py b/tests/locustfile-functional.py index 7ba9639..21cfb92 100644 --- a/tests/locustfile-functional.py +++ b/tests/locustfile-functional.py @@ -54,7 +54,8 @@ class QuickStartUser(SequentialTaskSet): mediaFileName = "tests/test-%s.png" % uuid with open(mediaFileName, "wb") as f: f.write(media) - ocrResult = subprocess.Popen("gocr %s" % mediaFileName, shell=True, stdout=subprocess.PIPE) + #ocrResult = subprocess.Popen("gocr %s" % mediaFileName, shell=True, stdout=subprocess.PIPE) + ocrResult = subprocess.Popen("tesseract %s stdout -l eng" % mediaFileName, shell=True, stdout=subprocess.PIPE) ocrAnswer = ocrResult.stdout.readlines()[0].strip().decode() return ocrAnswer