Commit Graph

158 Commits

Author SHA1 Message Date
Monika Kurovszky
21c2678784 SA04-008: gnathub --dry-run without project file
A new behavior is added to --dry-run switch in
  order to be able to run it without project file
  and list GNATdashboard predefined plugins.
  The old behavior is kept unchanged.

  Adding specific test for "gnathub --dry-run"

Change-Id: I05019f8442ac84eae5420ee9cce567d86b429405
2020-06-16 16:54:54 +02:00
Monika Kurovszky
8ac7cfba76 S304-007: --targs:tool behavior change
When no switch is provided this switch will be
  ignored without raising error.
  A warning message is displayed to notify the user
  about that.

Change-Id: I3d170ad300c38c2a1d8f6fcf2ae2ef676ac95ef1
2020-06-10 18:02:00 +02:00
Monika Kurovszky
b1b5d12c9d T529-001: support spaces in scenario variable paths
* -X switch argument parsing is separately done
    to ensure a better handling for cases where the
    paths contains white spaces in folder names
  * handling white spaces for sonar-scanner command
    line execution

Change-Id: I5d4b33953dec87ea50546ef43ab82c2a63374ed1
2020-06-08 17:55:00 +02:00
Monika Kurovszky
3a22976a0d T311-011: Non-zero error code when plugin failure
For the case that one or more plugins are failing
  during plugin-runner execution report a non-zero
  error code is returned to notify this behavior.

Change-Id: I68cb5e0404462e91940dcdb43e79b57682b96d88
2020-04-09 10:47:40 +02:00
Lespinasse
3f8fc824d6 WebUI: change to flask server
- All routes from old server replicated
	- Server is working on its own

DONE:
	- Link with GNAThub endled
	- Endpoints completed
	- Check in production mode
	- Logs working fine

Change-Id: I908502a17f27287db573ecbc3174c43ab4fa1192
For: SB18-033
2019-12-12 11:58:45 +01:00
Lespinasse
8debb41612 WebUI and GNAThub : Server error
- Fix the bug with truncated logs while using GNAThub.Run()
	- Handle exception like "port already in use"
	- Fix the bug while closing/opening server too quickly

Change-Id: I9a063c60f1726302e0837423274cb259fab84795
For: RA22-034
For: S911-037
2019-10-30 12:34:00 +01:00
Monika Kurovszky
6601afc101 S913-025: GNAThub command line --target handling
Propagate --target switch command line content
  to GNATcoll.Projects via Project_Env parameter

Change-Id: Ibf88bd574f88060d889b8c2f776c633c24b83e9c
2019-09-17 17:15:24 +02:00
Monika Kurovszky
1a123aca61 S508-006: Handling spaces in -P switch argument
Handling blank spaces in folder names passed as
  -P switch argument in GNAThub command line.

  Specific testcase added based on simple project.

Change-Id: I259e7982a101eae399f2cb11357f627def35a9b7
2019-05-20 12:18:40 +02:00
Monika Kurovszky
d3eff8b54e S220-046: Fix for GNAThub --incremental switch
* For all GNAThub tool plugins:
      Method clear_references for current tool is
      called only if it is not incremental mode for
      GNAThub run specified in command line

  * __init__.py and gnathub-python.adb:
       Add "incremental" command interface available
       for GNAThub in Python

  * gnathub-python-database.adb:
       Tool/add_messages command:
         It is used for bulk addition at tool level.
         Additional check added in order to ensure
         that no duplicated messages will be added
         to database (usefull for incremental mode).
       Message/Constructor_Method:
         In order to avoid duplicate messages when
         new properties are associated to an already
         present message, only messages properties
         entries will be created.

  * codepeer-mocked/test.py and test.out:
       Removing test from testsuite since replaced
       codepeer/test.py

  * create-message-with-property.py:
       Update test according to the changes related
       to Message/Constructor_Method

  * test-incremnetal:
       Testcase added to test incremental switch
       usage effect on database

Change-Id: I21271b8d1116ccb61aa062c39215cb18db792a7b
2019-03-05 15:10:47 +01:00
Monika Kurovszky
e4030f5ad2 O526-051: GNAThub test for aggregate project support
Change-Id: I8c6b09e263cc6acb20cc4e4abd069a706f25bdba
2018-12-21 10:12:40 +01:00
Monika Kurovszky
4b18fba9ad RC20-013: GNAThub --version exit code set to 0
Change-Id: I49affab43f57c9a67905656e991a0fddfe9d0fce
2018-12-21 10:11:59 +01:00
Monika Kurovszky
507c1d1d31 P511-010 : Add entity kind info in DB entities table
This information let to retrieve GNATmetric
  measures for file entities
  In order to differentiate high level compilation
  unit, the high level entity (package or procedure)
  has set "compilation unit" as kind.

Change-Id: Icdfd41e2b8519a779a720937a184334250509dca
2018-12-07 11:29:25 +01:00
Monika Kurovszky
c3181da107 R716-005 Add support for gcov multiple obj dir
Gather in GNAThub all gcov information originated
    by complex GPR files having multiple object dirs
   specified in different .gpr files

   New test case added for gcov based on sdc project
   modified in order to create a specific object
   folders hierarchy using Object_Dir attributes in
   the .gpr files

Change-Id: Ic8e645ebb95b0d02b61c7be7e75165c5cc1dd31b
2018-09-12 10:36:52 +02:00
Adrien Boulanger
5ac2f788e8 R718-028: Add entities_messages locations column
Change-Id: Ie134b060a0fc1daf8aa2c858c255936906489286
2018-08-10 10:20:44 +02:00
Arnaud Charlet
c2a13ad457 P208-034 Resync default port
Change-Id: Id8eed8f4d8fe1a4a3bb541cef574e2aa15d232f1
2018-07-24 17:47:34 +02:00
Arnaud Charlet
59536b3273 Minor reformatting. no-tn-check
Change-Id: Ibfa1bbb556c55a196da84774898d7f58679439fb
2018-07-24 17:46:25 +02:00
Monika Kurovszky
40e6327cc2 Remove Codepeer specific switches from GNAThub
"--output-dir" and "--db-dir"

   Using instead only Codepeer attributes from .gpr

Part of R703-038

Change-Id: Icee81f2f201b172d049a8150994dd79b30487072
2018-07-11 18:06:02 +02:00
Monika Kurovszky
bcadd0efc1 Using Codepeer specific attributes for WebUI
"Output_Directory" and "Database_Directory"

   These attributes could be used by adding to
   .gpr file a "Codepeer" package like bellow:
        package Codepeer is
            for Output_Directory use "my_dir";
            for Database_Directory use "my_db";
        end Codepeer;

   Use of these attributes will set Codepeer output
   and database directories to the specified values.

   GNAThub interface from server.py is
     * for "Output_Directory" attribute value:
           GNAThub.output_dir()
     * for "Database_Directory" attribute value:
           GNAThub.db_dir()

Part of R703-038


Change-Id: I562367880c60d64966efca1d0d6f1ca4775923dd
2018-07-10 16:11:13 +02:00
Monika Kurovszky
fec1d24a40 Adding --output-dir and --db-dir switches for WebUI
In order to pass to the web server the Codepeer
    * output directory: switch --output-dir is added
      (if not passed as command line argument,
       default value is set to
          [prj_obj_path]/codepeer/[prj_name].output)

    * db directory: switch --db-dir is added
      (if not passed as command line argument,
       default value is set to
          [prj_obj_path]/codepeer/[prj_name].db)

   GNAThub interface from server.py is
     * for --output-dir switch value or default:
           GNAThub.output_dir()
     * for --db-dir switch value or default:
           GNAThub.db_dir()

Part of R703-038

Change-Id: Id6537d2ca61a3737d5380c0795934359907059ed
2018-07-05 13:13:42 +02:00
Monika Kurovszky
8d76cf1376 Add -U switch for GNAThub
* __init_.py :
      '-U' switch interface u_process_all()
      method was added

  * gnathub-python.adb:
      U_Process_All_Function was added

  * gnatmetric.py, gnatcheck.py, codepeer.py,
    spark2014.py:
      propagate use of -U switch when used

  NOTE: The '-U main_file' switch implementation is
      not removed but kept as comment in the sources
      for later implementation

Part of P315-042

Change-Id: Iaff11740e3538d39c8a82f595f0a9ec5a65aa91c
2018-06-27 11:59:30 +02:00
Monika Kurovszky
7be22d2acc GNAThub DB: store tools message original id
* db.model:
      messages table changed by adding a columns to
      store messages id that are originally given
      by the specific tools
      (Note : default value is set to 0)

  * __init__.py:
      adding new parameter to constructor for new
      tool original message id column of messages
      table

  * gnathub-python-database.adb:
      adapt message handling to take into account
      new tool_msg_id column in messages table

  * codepeer.py:
      fill tool_msg_id field of messages table with
      corresponding values gathered from .csv output

  * updating codepeer.injected-results.csv with the
    currently generated output as reference

Part of R620-010

Change-Id: I2bc181d26d091305e34dc3ed24489d525200e0f5
2018-06-22 16:38:41 +02:00
Monika Kurovszky
91a9be2fff GNAThub --server and --server-dir switch
* Remove --server-dir switch

  * Launch only WEB server when --server switch
    provided. Only --port switch will be taken into
    account defining port for server launch. If no
    port is specified the default value used for
    port is 8000.

  * User manual is updated for the --server and
    --port switches

Part of R616-001

Change-Id: I6b6d391d28dc64589d1b649197907490b00208c4
2018-06-21 14:43:45 +02:00
Monika Kurovszky
d13c296fdb Add switches to launch web server
Note: '--server-dir' switch is provided but not
  used by server.py since is not useful since
  json files location is relative always to the
  root repository of the given .gpr file

Part of R616-001

Change-Id: Ic13f6a9ba6e18a5e42632c81859ba7d0a3bf950f
2018-06-20 12:51:06 -04:00
Arnaud Charlet
5375a0c8e7 R620-005 Add support for -d switch
codepeer.py: lower the progress bar frequency to reduce output overhead.

Change-Id: I948e7b230afa96d871766f8f25f202a701c73228
2018-06-20 12:05:31 +02:00
Monika Kurovszky
3e248d5402 Add switch --subdirs support for GNAThub
* __init_.py : subdirs interface method was added

  * gnathub-python.adb: Subdirs_Function was added

  * codepeer.py, gnatmetric.py, gnatcheck.py:
      propagate use of '--subdirs' switch

  * spark2014.py:
      prepared to support --subdirs when this switch
      will be implemented for gnatprove

  * test.py:
       test added for --subdirs switch

  * mock.py:
       add support for 'subdirs' argument used in
       GNAThub calls

Part of R208-037

Change-Id: I192804f54f61b3dffa80057b57a98af497a63ff0
2018-05-31 11:51:59 +02:00