nasa / fprime

F´ - A flight software and embedded systems framework

Home Page:https://nasa.github.io/fprime

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

F´ Builds Don't Detect Correctly

LeStarch opened this issue · comments

F´ Version
Affected Component

Problem Description

If a user does the following:

git clone https://github.com/nasa/fprime.git fprime-2
cd fprime-2
fprime-util generate

The system fails.

https://github.com/nasa/fprime-tools/blob/c15253c98ffc816bcca24db43f24c4c070b7c5ff/src/fprime/fbuild/settings.py#L26-L38

That code makes the assumption that fprime is in a folder called "fprime" and fails otherwise.

Context / Environment

Execute fprime-util version-check and share the output.

Operating System: Darwin
CPU Architecture: arm64
Platform: macOS-14.4.1-arm64-arm-64bit
Python version: 3.11.0
CMake version: 3.29.0
Pip version: 22.3
Pip packages:
    fprime-tools==3.4.4
    fprime-gds==3.4.4a1
    fprime-fpp-*==2.1.0a5

How to Reproduce

See description.

Expected Behavior

This should work in the following cases:

  1. fprime named something else
  2. fprime parallel to another fprime checkout

Here is what it should do:

  1. Check current directory for cmake/FPrime.cmake. If this exists, then the current directory is "fprime" (e.g. framework_path)
  2. Else:
  3. Glob match */cmake/FPrime.cmake
  4. If multiple hits: produce error. Must manually specify framework_path
  5. If one match: this is "fprime"
  6. If zero matches: cd to parent and recurse from 1 above